First time posting here.
Tried to search, couldn't find an exact example/result for my problem.
I'm trying to install and load caret, but keep getting the following error when trying to load ("library(caret)"):
Error: package or namespace load failed for ‘caret’ in namespaceExport(ns, exports): undefined exports: %++%, %ni%, Graph<-, Missing<-, Model<-, addvar<-, cancel<-, categorical<-, constrain<-, covariance<-, covfix<-, distribution<-, edgelabels<-, eventTime<-, exogenous<-, functional<-, heavytail<-, index<-, intercept<-, intervention<-, intfix<-, kill<-, labels<-, latent<-, nodecolor<-, nonlinear<-, offdiag<-, ordinal<-, parameter<-, parfix<-, randomslope<-, regfix<-, regression<-, revdiag<-, rmvar<-, timedep<-, transform<-, variance<-, Binary.lvm, By, CoefMat, CoefMat.multigroupfit, Col, Combine, Diff, Expand, GM2.lvm, GM3.lvm, Gamma.lvm, Graph, Grep, IV, Identical, Inverse, Missing, Model, NA2x, NR, OR, PD, Range.lvm, Ratio, Sequence.lvm, Specials, Weights, aalenExponential.lvm, addattr, addhook, addvar, adjMat, ancestors, as.sim, backdoor, baptize, beta.lvm, binary.lvm, binomial.lvm, binomial.rd, binomial.rr, blockdiag, bootstrap, cancel, categorical, children, chisq.lvm, click, clo In addition: Warning message: S3 methods ‘%++%.function’, ‘%++%.character’, ‘%++%.default’, ‘%++%.lvm’, ‘%++%.matrix’, ‘+.estimate’, ‘+.lvm’, ‘Graph<-.lvm’, ‘Graph<-.lvmfit’, ‘Model<-.lvm’, ‘Model<-.lvmfit’, ‘Model<-.multigroup’, ‘Model<-.multigroupfit’, ‘[.sim’, ‘addvar<-.lvm’, ‘cancel<-.lvm’, ‘constrain<-.default’, ‘constrain<-.multigroupfit’, ‘covariance<-.lvm’, ‘covfix<-.lvm’, ‘distribution<-.lvm’, ‘edgelabels<-.graphNEL’, ‘edgelabels<-.lvm’, ‘edgelabels<-.lvmfit’, ‘exogenous<-.lvm’, ‘functional<-.lvm’, ‘heavytail<-.lvm’, ‘index<-.lvm’, ‘index<-.lvmfit’, ‘intercept<-.lvm’, ‘intervention<-.lvm’, ‘kill<-.lvm’, ‘labels<-.default’, ‘latent<-.lvm’, ‘nodecolor<-.default’, ‘nodecolor<-.lvm’, ‘nonlinear<-.lvm’, ‘ordinal<-.lvm’, ‘parameter<-.lvm’, ‘parameter<-.lvmfit’, ‘parfix<-.lvm’, ‘randomslope<-.lvm’, ‘regfix<-.lvm’, ‘regression<-.lvm’, ‘rmvar<-.lvm’, ‘transform<-.lvm’, ‘variance<-.lvm’, ‘Graph.lvm’, ‘Graph.lvmfit’, ‘Model.default’, ‘Model.lvm’, ‘Model.lvmfit’, ‘Model.multigroup’, ‘Model.multigroupfit’, ‘Weights.def [... truncated]
Unfortunately I don't understand the error message, and what to do. This is what I've tried so far:
- Fresh install of R and Rstudio (newest versions)
- Updated all packages
- Reinstalled caret with "install.packages("caret", dependencies = c("Depends", "Suggests"))"
Session info:
R version 4.1.2 (2021-11-01) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 19042)
Matrix products: default
locale: [1] LC_COLLATE=Norwegian Bokmål_Norway.1252 LC_CTYPE=Norwegian Bokmål_Norway.1252 LC_MONETARY=Norwegian Bokmål_Norway.1252 [4] LC_NUMERIC=C
LC_TIME=Norwegian Bokmål_Norway.1252attached base packages: [1] stats graphics grDevices utils
datasets methods baseother attached packages: [1] lattice_0.20-45 forcats_0.5.1
stringr_1.4.0 dplyr_1.0.7 purrr_0.3.4 readr_2.1.1
tidyr_1.1.4 [8] tibble_3.1.6 ggplot2_3.3.5 tidyverse_1.3.1loaded via a namespace (and not attached): [1] httr_1.4.2
jsonlite_1.7.2 splines_4.1.2 foreach_1.5.1 modelr_0.1.8 assertthat_0.2.1 [7] cellranger_1.1.0 globals_0.14.0
pillar_1.6.4 backports_1.4.1 glue_1.5.1 digest_0.6.29 [13] rvest_1.0.2 colorspace_2.0-2 Matrix_1.3-4
plyr_1.8.6 timeDate_3043.102 pkgconfig_2.0.3 [19] broom_0.7.10 listenv_0.8.0 haven_2.4.3 scales_1.1.1 gower_0.2.2 tzdb_0.2.0 [25] generics_0.1.1
ellipsis_0.3.2 withr_2.4.3 nnet_7.3-16 cli_3.1.0
survival_3.2-13 [31] magrittr_2.0.1 crayon_1.4.2
readxl_1.3.1 fs_1.5.2 fansi_0.5.0 future_1.23.0 [37] parallelly_1.30.0 nlme_3.1-153 MASS_7.3-54
xml2_1.3.3 class_7.3-19 tools_4.1.2 [43] hms_1.1.1 lifecycle_1.0.1 munsell_0.5.0 reprex_2.0.1 compiler_4.1.2 rlang_0.4.12 [49] grid_4.1.2
iterators_1.0.13 rstudioapi_0.13 gtable_0.3.0
codetools_0.2-18 DBI_1.1.1 [55] R6_2.5.1
lubridate_1.8.0 future.apply_1.8.1 utf8_1.2.2 stringi_1.7.6 parallel_4.1.2 [61] Rcpp_1.0.7 vctrs_0.3.8
rpart_4.1-15 dbplyr_2.1.1 tidyselect_1.1.1
I get no error messages during the installation:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/ Installing package into ‘C:/Users/XXXX/XXXX XXXX/XXXX/R/win-library/4.1’ (as ‘lib’ is unspecified) trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.1/caret_6.0-90.zip' Content type 'application/zip' length 3590135 bytes (3.4 MB) downloaded 3.4 MB
package ‘caret’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in C:\Users\XXXXX\AppData\Local\Temp\RtmpmSCIPo\downloaded_packages
Am I missing something basic here? Any help would be much appreciated!