-
Notifications
You must be signed in to change notification settings - Fork 15
first pass at creating flatline variables #458
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
Conversation
tests/testthat/test-row-distinct.R:36:1: style: Lines should not be more than 100 characters. ds$catarray$subvar1 == ds$catarray$subvar2 & ds$catarray$subvar3 == ds$catarray$subvar2,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
tests/testthat/test-row-distinct.R:36:1: style: Lines should not be more than 100 characters. ds$catarray$subvar1 == ds$catarray$subvar2 & ds$catarray$subvar3 == ds$catarray$subvar2,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
tests/testthat/test-row-distinct.R:36:1: style: Lines should not be more than 100 characters. ds$catarray$subvar1 == ds$catarray$subvar2 & ds$catarray$subvar3 == ds$catarray$subvar2,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Codecov Report
@@ Coverage Diff @@
## master #458 +/- ##
=======================================
Coverage 90.54% 90.55%
=======================================
Files 121 122 +1
Lines 6931 6943 +12
=======================================
+ Hits 6276 6287 +11
- Misses 655 656 +1
Continue to review full report at Codecov.
|
tests/testthat/test-row-distinct.R:56:1: style: Lines should not be more than 100 characters. ds$catarray$subvar1 == ds$catarray$subvar2 & ds$catarray$subvar3 == ds$catarray$subvar2,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ tests/testthat/test-row-distinct.R:77:1: style: Lines should not be more than 100 characters. expect_error(flatlineResponse(ds$catarray["subvar1"]), "Array must have more than 1 subvariable.")
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
closes #456
Things I don't love, but felt like good compromises for a first pass. Documenting them here in case you don't agree.
Only work on existing array variables. You can't group together arbitrary variables (I wanted to make code simpler) nor use a variable definition to create an ad-hoc variable (because of
as.vector
doesn't work on categorical array expression #457 and because I'd have to parse the expression, which seemed like too much work).Very limited handling of missingness.
rowDistinct()
can either ignore any missing value (the default) or treat all kinds of missings as a single category (na.rm = FALSE
). You can't customize behavior when there are multiple types of missing.flatlineResponse()
uses equality, so if all values are a single type of missing it will come back as aSelected
/TRUE
value, but if only some, or if there are multiple types of missing it will come back asNo Data
/NA
.I probably need to finish as.* functions for CrunchExpressions #430, because your proposed exclusion filter of
can't be created from R currently, because it needs to have
as.numeric()
around the logical expressions (because the db doesn't like adding logical + numeric, whch after adding A+B we have a numeric), and you can't currently doas.numeric()
onCrunchLogicalExpr
.