R package caret fails to load - r

I am using R4.0.0, I used the 'caret' package successfully a week ago. But now when I am trying to rerun my program, I get the following error:
Error: package or namespace load failed for ‘caret’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Documents/R/win-library/4.0/iterators/R/iterators.rdb': No such file or directory
How can I fix this problem?

Related

Error in the Installation of caret library

In running caret library I have this error :
install.packages('caret', dependencies = TRUE)
library(caret)
error reading the fileError: package or namespace load failed for ‘caret’ in readRDS(nsInfoFilePath):
error reading from connection
Could you help me how to solve it?

Error: package or namespace load failed for ‘CGPfunctions’ [duplicate]

I am getting the following error when I am loading a few libraries in R:
library(forecast)
Error : object ‘f_eval’ is not exported by 'namespace:lazyeval'
In addition: Warning message:
package ‘forecast’ was built under R version 3.3.2
Error: package or namespace load failed for ‘forecast’
library(tsoutliers)
Error : object ‘f_eval’ is not exported by 'namespace:lazyeval'
In addition: Warning message:
package ‘tsoutliers’ was built under R version 3.3.2
Error: package or namespace load failed for ‘tsoutliers’
I have tried reinstalling the packages but it didn't help. Also, I was able to use the forecast package previously but I started facing this error post the installation of tsoutliers package.
How can I resolve this issue?
This should do the job for you:
install.packages('lazyeval')
In the future, try and provide a bit more about your system and install, using the output from:
sessionInfo()

I cannot load java in R. I tried to point java location manually, it didn't work either. Any idea why?

I tried different ways, but I cannot load 'rjva' package in R.
I'm working on windows 10 and using latest version of R (3.4.3) and JAVA (jre1.8.0_191).
Here's the error message
library(rJava)
Error: package or namespace load failed for ‘rJava’ in get(Info[i, 1], envir = env):
lazy-load database 'C:/Users/SONY/Documents/R/win-
library/3.4/rJava/R/rJava.rdb' is corrupt
In addition: Warning messages:
1: package ‘rJava’ was built under R version 3.4.4
2: In get(Info[i, 1], envir = env) : internal error -3 in R_decompress1
I tried to point out java loction manually as given below, but that didn't work either.
Sys.setenv(JAVA_HOME="C:/Program Files/Java/jre1.8.0_191")

"no such symbol C_contour" error when loading package "foreign" in R

I want to use the package foreign to turn an Octave text file representing a read audio file into R vector data; however, when I try to load the package using library(foreign), I get the following error message:
Loading required package: Matrix
Error: package or namespace load failed for ‘Matrix’ in FUN(X[[i]], ...):
no such symbol C_contour in package /Library/Frameworks/R.framework/Versions/3.4/Resources/library/graphics/libs/graphics.so
Error: package ‘Matrix’ could not be loaded
I tried deleting the R.framework file and reinstalling (a method which worked for someone else with a similar error) and continued to encounter this error.
Does anyone know what the holdup here is?

Error with loading my package in r?

I built my own package and everythings goes well. then when I generate src file for .c files I got the problem.
1- I used devtools::use_rcpp()
2- Then create a file to put these lines: #' #useDynLib Mypackage
#' #importFrom Rcpp sourceCpp
NULL
Then when I build adn load the package I got this error:
Error: package or namespace load failed for ‘Mypackage’ in library.dynam(lib, package, package.lib):
shared object ‘Mypackage.so’ not found
Error: loading failed
Execution halted
ERROR: loading failed
Note that: my namespace files generated automatically by roxygen2.
any help please?
I built my package again using the Rcpp.package.skeleton() :
I then built my own funciton in R where I call the .C file but I got this error.
My_func <- function(x){
x*4
.Call(rcpp_hello_world,PACKAGE = "Mypackage")[[1]]
}
> My_func(4)
Error in .Call(rcpp_hello_world, PACKAGE = "MixRVinE") :
first argument must be a string (of length 1) or native symbol reference

Resources