Issue
I am trying to use the caret library but can’t use the package due to a dependency issue regarding “reshape2”. A simple library(caret) does not work.
Traceback
Error: package or namespace load failed for ‘caret’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘reshape2’
Traceback:library(caret)
tryCatch({
attr(package, “LibPath”) <- which.lib.loc
ns <- loadNamespace(package, lib.loc)
env <- attachNamespace(ns, pos = pos, deps, exclude, include.only)
error = function(e) {
P <- if (!is.null(cc <- conditionCall(e)))
paste(” in”, deparse(cc)[1L])
else “”
msg <- gettextf(“package or namespace load failed for %s%s:n %s”,
sQuote(package), P, conditionMessage(e))
if (logical.return)
message(paste(“Error:”, msg), domain = NA)
else stop(msg, call. = FALSE, domain = NA)
. })
tryCatchList(expr, classes, parentenv, handlers)
tryCatchOne(expr, names, parentenv, handlers[[1L]])
value[3L]
stop(msg, call. = FALSE, domain = NA)
What I Tried…
I have attempted to install “reshape2” as a separate package but it says that the package is already installed. I’ve tried installing the package several times using conda, mamba, rscript etc. but I’m unable to use the package.