I recently installed the developing version of dartR and am now realizing I need to update the code for a few of the functions and I am running into some errors when plotting is needed.
by running that now I get the following error:
Error in layer(data = data, mapping = mapping, stat = stat, geom = GeomBar, :
object 'plot_colors' not found
If I run ?gl.filter.maf and follow the suggested function and respective arguments:
gl.filter.maf(mtgl6, threshold = 0.01, by.pop = FALSE, maf.limit = 0.5, pop.limit = 4,
ind.limit = 1, recalc = FALSE, plot.out = TRUE, plot_theme = theme_dartR(),
plot_colors_pop = discrete_palette, plot_colors_all = two_colors, bins = 25,
save2tmp = FALSE, verbose = NULL)
I still get a similar error:
Error in layer(data = data, mapping = mapping, stat = stat, geom = GeomBoxplot, :
object 'two_colors' not found
What could be the problem?
Thanks!
sessionInfo()
R version 4.0.4 (2021-02-15)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS 12.2.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ggplotify_0.1.0 forcats_0.5.1 stringr_1.4.0 dplyr_1.0.8 purrr_0.3.4
[6] readr_2.1.2 tidyr_1.2.0 tibble_3.1.6 tidyverse_1.3.1 ggplotAssist_0.1.3
[11] dartR_2.4 ggplot2_3.3.5 adegenet_2.1.5 ade4_1.7-18
loaded via a namespace (and not attached):
[1] readxl_1.3.1 backports_1.4.1 spam_2.8-0 StAMPP_1.6.3
[5] plyr_1.8.6 igraph_1.2.11 sp_1.4-6 splines_4.0.4
[9] digest_0.6.29 yulab.utils_0.0.4 foreach_1.5.2 htmltools_0.5.2
[13] viridis_0.6.2 gdata_2.18.0 fansi_1.0.2 magrittr_2.0.2
[17] cluster_2.1.2 doParallel_1.0.17 PopGenReport_3.0.4 tzdb_0.2.0
[21] openxlsx_4.2.5 modelr_0.1.8 R.utils_2.11.0 colorspace_2.0-3
[25] rvest_1.0.2 mmod_1.3.3 haven_2.4.3 xfun_0.30
[29] rgdal_1.5-28 crayon_1.5.0 jsonlite_1.8.0 iterators_1.0.14
[33] ape_5.6-2 glue_1.6.2 gtable_0.3.0 seqinr_4.2-8
[37] maps_3.4.0 scales_1.1.1 mvtnorm_1.1-3 DBI_1.1.2
[41] GGally_2.1.2 miniUI_0.1.1.1 Rcpp_1.0.8 viridisLite_0.4.0
[45] xtable_1.8-4 gridGraphics_0.5-1 foreign_0.8-82 dotCall64_1.0-1
[49] DT_0.21 dismo_1.3-5 htmlwidgets_1.5.4 httr_1.4.2
[53] RColorBrewer_1.1-2 shinyAce_0.4.1 genetics_1.3.8.1.3 calibrate_1.7.7
[57] ellipsis_0.3.2 pkgconfig_2.0.3 reshape_0.8.8 R.methodsS3_1.8.1
[61] farver_2.1.0 sass_0.4.0 dbplyr_2.1.1 utf8_1.2.2
[65] tidyselect_1.1.2 labeling_0.4.2 rlang_1.0.2 reshape2_1.4.4
[69] later_1.3.0 munsell_0.5.0 cellranger_1.1.0 tools_4.0.4
[73] cli_3.2.0 generics_0.1.2 broom_0.7.12 fastmap_1.1.0
[77] knitr_1.37 fs_1.5.2 gdsfmt_1.26.1 zip_2.2.0
[81] RgoogleMaps_1.4.5.3 nlme_3.1-155 mime_0.12 R.oo_1.24.0
[85] xml2_1.3.3 gap_1.2.3-1 compiler_4.0.4 rstudioapi_0.13
[89] curl_4.3.2 png_0.1-7 reprex_2.0.1 bslib_0.3.1
[93] stringi_1.7.6 gdistance_1.3-6 fields_13.3 lattice_0.20-45
[97] Matrix_1.4-0 vegan_2.5-7 permute_0.9-7 vctrs_0.3.8
[101] pillar_1.7.0 lifecycle_1.0.1 combinat_0.0-8 editData_0.1.8
[105] jquerylib_0.1.4 data.table_1.14.2 SNPRelate_1.24.0 raster_3.5-15
[109] httpuv_1.6.5 patchwork_1.1.1 R6_2.5.1 promises_1.2.0.1
[113] gridExtra_2.3 rio_0.5.29 codetools_0.2-18 MASS_7.3-55
[117] gtools_3.9.2 assertthat_0.2.1 shinyWidgets_0.6.4 withr_2.5.0
[121] pegas_1.1 mgcv_1.8-39 parallel_4.0.4 hms_1.1.1
[125] terra_1.5-21 grid_4.0.4 shiny_1.7.1 lubridate_1.8.0