-
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 #161 Coercion date datatype #214
Conversation
Sorry - I ran out of time to look this over today - @atorus-research/xportr-development-team does anyone else have time to review this PR and help diagnose the R-CMD checks? |
I'll fix the R CMD checks for this one. Looks like there is also a merge conflict as we change some options, I'll resolve it as well. |
# Conflicts: # R/zzz.R
R/xportr-package.R
Outdated
#' coerce R classes to character XPT types. Default: "character" | ||
#' } | ||
#' \item{ | ||
#' xportr.character_metadata_types - The default character vector used to explicitly | ||
#' coerce R classes to character XPT types. Default: c("character", "char", | ||
#' "text", "date", "posixct", "posixt", "datetime", "time", "partialdate", | ||
#' "partialtime", "partialdatetime", "incompletedatetime", "durationdatetime", | ||
#' "intervaldatetime") | ||
#' } | ||
#' \item{ | ||
#' xportr.numeric_metadata_types - The default character vector used to explicitly | ||
#' coerce R classes to numeric XPT types. Default: c("integer", "numeric", "num", "float") | ||
#' } | ||
#' \item{ | ||
#' xportr.numeric_types - The default character vector used to explicitly | ||
#' coerce R classes to numeric XPT types. Default: c("integer", "numeric", | ||
#' "num", "float") | ||
#' coerce R classes to numeric XPT types. Default: c("integer", "float", "posixct", "posixt", "time", "date") |
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.
Please update the changes in the options
docs 1/2
R/options.R
Outdated
#' \item{xportr.character_types}{defaults to `"character"`}: | ||
#' The default character vector used to explicitly coerce R classes to character XPT types. | ||
#' \item{xportr.character_metadata_types}{defaults to `c("character", "char", "text", "date", "posixct", "posixt", | ||
#' "datetime", "time", "partialdate", "partialtime", "partialdatetime", | ||
#' "incompletedatetime", "durationdatetime", "intervaldatetime")`}: | ||
#' The default character vector used to explicitly coerce R classes to character XPT types. | ||
#' \item{xportr.numeric_types}{defaults to `c("integer", "numeric", "num", "float")`}: | ||
#' \item{xportr.numeric_metadata_types}{defaults to `c("integer", "numeric", "num", "float")`}: | ||
#' The default character vector used to explicitly coerce R classes to numeric XPT types. | ||
#' \item{xportr.numeric_types}{defaults to `c("integer", "float", "posixct", "posixt", "time", "date")`}: |
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.
Please update the changes in the options
docs 2/2
Co-authored-by: Ben Straub <[email protected]>
…ch/xportr into 161-coercion-date-datatype
ffac454
to
2d5fe41
Compare
…ch/xportr into 161-coercion-date-datatype
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #214 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 664 665 +1
=========================================
+ Hits 664 665 +1 ☔ View full report in Codecov by Sentry. |
Thank you for your Pull Request!
We have developed a Pull Request template to aid you and our reviewers. Completing the below tasks helps to ensure our reviewers can maximize their time on your code as well as making sure the xportr codebase remains robust and consistent.
The scope of
{xportr}
{xportr}
's scope is to enable R users to write out submission compliantxpt
files that can be delivered to a Health Authority or to downstream validation software programs. We see labels, lengths, types, ordering and formats from a dataset specification object (SDTM and ADaM) as being our primary focus. We also see messaging and warnings to users around applying information from the specification file as a primary focus. Please make sure your Pull Request meets this scope of {xportr}. If your Pull Request moves beyond this scope, please get in touch with the{xportr}
team on slack or create an issue to discuss.Please check off each task box as an acknowledgment that you completed the task. This checklist is part of the Github Action workflows and the Pull Request will not be merged into the
devel
branch until you have checked off each task.Changes Description
Added xportr.character_metadata_types and xportr.numeric_metadata_types so that all R types, including dates, are handled by xportr_type. In case the R type is different from the metadata type, the variable is coerced
I am wondering it the utility function
first_class
is still needed?Task List
styler
package and functions to style files accordingly.devtools::document()
so all.Rd
files in theman
folder and theNAMESPACE
file in the project root are updated appropriatelypkgdown::build_site()
and check that all affected examples are displayed correctly and that all new/updated functions occur on the "Reference" page.vbump.yaml
CI.