-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #142 issue_142_updated to account for DT, DTM, TM variables #145
Merged
Merged
Changes from 4 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c0f84b0
updated to account for DT, DTM, TM variables
12fd07b
updates
2f0e783
fixed
713f3d3
fixed
0fa5e68
updates
e45cb28
Merge branch 'devel' into issue_142_dates
bms63 3583b24
updates
a772092
Passing R CMD Check, linting, styling
elimillera 008386c
Merge branch 'devel' into issue_142_dates
elimillera 027fcff
Merge branch 'devel' into issue_142_dates
elimillera b9ea9e7
updated test
8808bc1
Merge branch 'issue_142_dates' of https://github.com/atorus-research/…
839bffe
updates
00dcfe7
updates
7d2c4e2
Merge branch 'devel' into issue_142_dates
elimillera 0efc1b0
clean up files, remove tibble dependancy on tests
elimillera 412c75d
Lint and style
elimillera ddc813b
chore: #142 news update
bms63 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data are still converted to numeric R class. The attribute should numeric but the R class should stay date/dttm/time. The numeric date variables should not go through ".df[[i]] <<- as.numeric(.df[[i]])"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpiraux can you give an example dataframe where this happens and what the expected result should be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that it is actually not coerced but the message is still present. I used df and metadata in test-type for the review:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be fixed now @cpiraux
@elimillera can you take a look too? I've implemented your suggestion in today's meeting. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't use a metacore object but a dataframe for the metadata
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Jump in the conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the testthat for this function and I see a new issue where in line 205 of test-type.R, the original df and xpt file have different timezones.
── Failure (test-type.R:208:3): xportr_type: date variables are not converted to numeric ──
df$RFICDTM (
actual
) not equal to df_xpt$RFICDTM (expected
).actual
: 1490824800expected
: 1490832000I checked the documentation and it comes from this parameter in the write_xpt function of haven:
Is this something to be concerned about? @cpiraux @elimillera @kaz462
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking into this! Timezone should be ignored. As the default value in haven for
adjust_tz = TRUE
, I think it is okay. I open dfdates.xpt in SAS and dates are okay. Is it possible to ignore the timezone when you compare the dates in testthat?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cpiraux test updated to expect that the as_character() of each datetime are equal so that timezone is ignored.