Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEmpty plots when model has 2 or more factor variables #39
Comments
|
Thanks for reporting this and sorry it's taken me a while to get around to looking at this. This is due to some silly logic adding the parametric plots to the list of plots to draw. I'm testing a fix now and should have something committed to the master branch shortly. |
|
Thank you, it's perfect! Sorry it took me so long to reply - and thanks for the great package! |
This happened to me recently, when I tried to recreate a plot from a previous project (worked perfectly about a month ago). When a model has 2 or more factor variables, an extra empty plot is drawn between them.
As far as I can tell, it's a problem with the number of parametric term elements returned - there is an extra NULL element in the final plot list to draw, which causes the empty plot..
More empty plots are added for each additional factor variable in the model - 1 between factor1 and factor2, 2 between factor2 and factor3, and I suppose it would go on.
Example below.
Created on 2019-04-05 by the reprex package (v0.2.1)
Session info:
R version 3.5.3 (2019-03-11)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Linux Mint 19
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=bg_BG LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=bg_BG LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=bg_BG LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] reprex_0.2.1 gratia_0.2-8 mgcv_1.8-28 nlme_3.1-137
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 pillar_1.3.1 compiler_3.5.3 plyr_1.8.4 tools_3.5.3
[6] digest_0.6.18 evaluate_0.13 tibble_2.1.1 gtable_0.3.0 lattice_0.20-38
[11] pkgconfig_2.0.2 rlang_0.3.3 Matrix_1.2-17 rstudioapi_0.10 yaml_2.2.0
[16] mvtnorm_1.0-10 xfun_0.6 knitr_1.22 dplyr_0.8.0.1 fs_1.2.7
[21] grid_3.5.3 cowplot_0.9.4 tidyselect_0.2.5 glue_1.3.1 R6_2.4.0
[26] processx_3.3.0 rmarkdown_1.12 callr_3.2.0 whisker_0.3-2 ggplot2_3.1.0
[31] purrr_0.3.2 tidyr_0.8.3 clipr_0.5.0 magrittr_1.5 ps_1.3.0
[36] htmltools_0.3.6 scales_1.0.0 splines_3.5.3 assertthat_0.2.1 colorspace_1.4-1
[41] labeling_0.3 lazyeval_0.2.2 munsell_0.5.0 crayon_1.3.4