-
Notifications
You must be signed in to change notification settings - Fork 29
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
plot(xpose_plot) vs xpose_plot gives different results. (ie Seeing @x, @y @dir when using plot(xpose_plot)) #156
Comments
Actually, it seems: plot(dv_vs_pred(xpdb) +
ylab("Observed Nimotuzumab Concentrations (ug/mL)") +
xlab("Population Predicted Nimotuzumab Concentrations (ug/mL)")) gives the strange plots whereas: dv_vs_pred(xpdb) +
ylab("Observed Nimotuzumab Concentrations (ug/mL)") +
xlab("Population Predicted Nimotuzumab Concentrations (ug/mL)") gives the correct labels. |
Because of this, I'm unsure how to save plots to pdf in https://github.com/nlmixrdevelopment/nlmixr-examples/blob/master/case-study-nimotuzumab/Nimo.R If I don't plot them, they of course don't show up in the GOF page: https://github.com/nlmixrdevelopment/nlmixr-examples/blob/master/case-study-nimotuzumab/GOF-nimo.pdf |
did you try the print method ? |
I did try the print method, but I was trying to be too clever: dv_vs_pred(xpdb) +
ylab("Observed Nimotuzumab Concentrations (ug/mL)") +
xlab("Population Predicted Nimotuzumab Concentrations (ug/mL)") %>% print did not work because of operator precedence. I changed to If I change to: print(dv_vs_pred(xpdb) +
ylab("Observed Nimotuzumab Concentrations (ug/mL)") +
xlab("Population Predicted Nimotuzumab Concentrations (ug/mL)")) everything works well. Perhaps the question is if xpose wants to support the |
@mattfidler the trick for the operator precedence issue is to use xpdb %>%
{dv_vs_pred(.) +
ylab("Observed Nimotuzumab Concentrations (ug/mL)") +
xlab("Population Predicted Nimotuzumab Concentrations (ug/mL)")} %>%
print() I have always used |
That is true; You could also use parentheses. |
One last point/question; In your new version would you want plot(xpdb) # where xpdb is the expose data object To plot a common list of plots that are considered best pratice to run. |
@mattfidler, having the possibility to store plots within the xpdb is something I have been considering for a while e.g.:
But I still need to figure out a few things. Maybe using plot (render the plot) vs. print (prints the xpdb overview as of the current version) could be a way to go but it would break all previous codes... |
Hi @guiastrennec, That is what I do for RxODE objects; Plot plots a ggplot of the solved system and print gives the overview. I'm unsure what would break, but I think since you are adapting s3, things might break in general. |
Hi @guiastrennec,
I'm seeing the
@x
@y
etc again. I'm assuming something in the updated tidyverse may be to blame?stringi
or something similar?'My sessionInfo:
The text was updated successfully, but these errors were encountered: