-
Notifications
You must be signed in to change notification settings - Fork 5
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
adapt to tibble from REDCapR #61
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.
some comments to help @RaymondBalise & @gabrielodom evaluate this PR better.
c(1, 2, 3, 4, 5), | ||
label = "Study ID", | ||
class = c("labelled", "numeric") | ||
), |
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'm not sure why the new version of REDCapR produces this change. But I haven't really studied what tidyREDCap does with the labelled class.
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.
labelled needs to be the last argument in the class list. So we need a unit test to make sure that all is still good. See the fix_class_bug() function in make_instrument_auto.R. It is a horrible kludge. We need to look at the labeling function that REDCapTidieR is using to see if things could be simpler.
@@ -65,7 +70,7 @@ target <- structure( | |||
"character" | |||
)) | |||
), | |||
row.names = c(NA, -5L), class = "data.frame" | |||
row.names = c(NA, -5L), class = c("tbl_df", "tbl", "data.frame") |
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.
adapt to the tibble that REDCapR returns.
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.
Need to double check the unit test still behaves but it makes good sense.
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 would be good to go though this together. Talk to you soon.
@@ -65,7 +70,7 @@ target <- structure( | |||
"character" | |||
)) | |||
), | |||
row.names = c(NA, -5L), class = "data.frame" | |||
row.names = c(NA, -5L), class = c("tbl_df", "tbl", "data.frame") |
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.
Need to double check the unit test still behaves but it makes good sense.
changes during meeting w/ @RaymondBalise, @gabrielodom , & @kyleGrealis ref RaymondBalise#59
Looks good to me |
close #59