Skip to content
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

Work around dplyr 0.8 handling of factors in groups #91

Closed
billdenney opened this issue Dec 31, 2018 · 2 comments
Closed

Work around dplyr 0.8 handling of factors in groups #91

billdenney opened this issue Dec 31, 2018 · 2 comments

Comments

@billdenney
Copy link
Owner

Related to tidyverse/dplyr#4061

This causes a failure for PKNCA tests at least with tss.monoexponential at

expect_equal(
expect_warning(
pk.tss.monoexponential(
conc=tmpdata$conc,
time=tmpdata$time,
subject=tmpdata$subject,
treatment=tmpdata$treatment,
time.dosing=0:14,
verbose=FALSE
)
),
data.frame(subject=factor(c(1, 10, 2:9)),
tss.monoexponential.population=4.57618156812974,
tss.monoexponential.popind=c(
5.14156352865421, 4.64862524830397, 4.45956707917941,
4.41492203844343, 4.6782583033301, 4.0823047621517,
4.96242115751172, 4.52424147509819, 3.70338406668837,
5.1465280219363),
treatment=c("A", "B", "A", "A", "A",
"A", "B", "B", "B", "B"),
tss.monoexponential.individual=c(
5.87784329336254, 4.71066285661623, 4.51882509145954,
3.91269286106442, 4.74475071729459, 3.99341726779716,
5.08737230904342, 4.50068650719192, 3.4876172020751,
5.35051537086801),
tss.monoexponential.single=4.56067603534),
tolerance=1e-4,
check.attributes=FALSE,
info="pk.tss.monoexponential 1")

It also probably causes issues with the summary functions, but testing currently doesn't include factors with imbalanced levels.

@billdenney
Copy link
Owner Author

billdenney commented Jan 2, 2019

This fix will likely affect #74 and #79, too.

@billdenney
Copy link
Owner Author

As discussed in the dplyr issue, the behavior is reverted to the prior behavior so no change is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant