Closed Eliford closed 7 years ago
if you use "classic" data.frames for sim/obs instead of tbl_df it works fine. Will put a conversion in place to do this automatically.
Thank you Ron but the solution still does not work for me.
I converted from tbl_df to data.frame as below. But still got the error! Error in grep("row", facet) : object 'facet' not found
obs<-obs%>%mutate(doseg=ifelse(dose<4.5,1,2))%>%as.data.frame()
sim<-sim%>%mutate(doseg=ifelse(dose<4.5,1,2))%>%as.data.frame()
i already implemented the auto-conversion, so if you just re-install the vpc library from GitHub the code you sent earlier should work fine even without converting to data.frame yourself.
Dear Ron, Thank you for working on this issue. Unfortunately I still get the same error message as before. Below is the session info when I run the same code as I posted before.
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.2 LTS
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] bindrcpp_0.1 vpc_0.1.1 magrittr_1.5 classInt_0.1-23 dplyr_0.5.0.9001
loaded via a namespace (and not attached):
[1] Rcpp_0.12.10 bindr_0.1 knitr_1.15.1 splines_3.3.3 MASS_7.3-45 munsell_0.4.3 colorspace_1.3-2
[8] lattice_0.20-34 R6_2.2.0 rlang_0.0.0.9006 plyr_1.8.4 tools_3.3.3 grid_3.3.3 gtable_0.2.0
[15] e1071_1.6-8 class_7.3-14 yaml_2.1.14 survival_2.41-2 lazyeval_0.2.0.9000 assertthat_0.1 tibble_1.3.0
[22] Matrix_1.2-8 ggplot2_2.2.1 glue_0.0.0.9000 scales_0.4.1
ah i see it now, issue with "facet" variable in the plot_vpc(). I had a global "facet" variable set in my environment so I didn't see this bug. Fixed now, please re-install.
Thank you Ron, i think you haven't pushed the new commit.
done now :)
I was re-doing a VPC using the
vpc
package. It used to work when stratifying by 2 variables, but now it doesnot. Below is an rmarkdown file that I use the example given in thevpc package documentation
. It works When I use 1 variable to stratify but doesn't with 2 variables. The error message isError in grep("row", facet) : object 'facet' not found