Error in loadNamespace(name) : there is no package called 'evaluate' - r

While adding code chuncks to my .rmd file a la:
```{r} %code chunck
```
it can't be compiled anymore, and i get a loadnamespace(name) error:
Error in loadNamespace(name) :
there is no package called 'evaluate' calls:<Anonymous> ... tryCatch-> Trycatchlist->trycatchoone
Has anyone ever experienced it? And how do I resolve it?

Try install.packages("evaluate") and then reattempt compilation. It was probably uninstalled unintentionally at some point.

if it is not installed after tying install.packages('evaluate')then,press ctrl + shift + f10 on RStudio console so this command will restart R session and then try to use install.packages('evaluate') command on RStudio console.

For me, the solution was just to install the hexbin package: install.packages("hexbin")

Creating a new R session and installing the package again worked for me.

Related

I keep getting the following error when i try running a ggplot code [duplicate]

While adding code chuncks to my .rmd file a la:
```{r} %code chunck
```
it can't be compiled anymore, and i get a loadnamespace(name) error:
Error in loadNamespace(name) :
there is no package called 'evaluate' calls:<Anonymous> ... tryCatch-> Trycatchlist->trycatchoone
Has anyone ever experienced it? And how do I resolve it?
Try install.packages("evaluate") and then reattempt compilation. It was probably uninstalled unintentionally at some point.
if it is not installed after tying install.packages('evaluate')then,press ctrl + shift + f10 on RStudio console so this command will restart R session and then try to use install.packages('evaluate') command on RStudio console.
For me, the solution was just to install the hexbin package: install.packages("hexbin")
Creating a new R session and installing the package again worked for me.

Usage of an Internal R Package Error Message

I am trying to use a company internal r-package and I am getting the following warning message in R-Studio when I want to load the library. So installation works, but when I try to load the library is spits this error:
"In fun(libname, pkgname) :"
Does anyone know what the problem is here?
Thanks in advance!
try installing first with install.packages("path to your .zip package file", repos=NULL)
Then use library or require. If anything goes wrong with these two steps, there is a problem with the package itself and you should ask its developers for help.
EDIT: if your package is on github, you can try:
install.packages("devtools")
library("devtools")
devtools::install_github("your package URL")

Error in running swirl package in R

I am not able to work in swirl package in R. I am able to install the swirl
package correctly. But while giving the library("swirl") command the error comes up.I have tried every thing like I am not able to find the answer of this error on internet. I have reinstalled R complete. I have tried changing directory. But still this error message is coming. Please help.This is the error message:
library("swirl")
Error in get(Info[i, 1], envir = env) :
cannot open file
'C:/Users/Devender/Documents/R/win-library/3.2/httr/R/httr.rdb': No such
file or directory
Error: package or namespace load failed for ‘swirl’
Thanks alot in advance
Try installing httr package. I think it will solve your problem.
You did not say which R version you are using.
Some Swirl packages are not available for few R versions as 3.2.2. You cant even download any courses from Github repositories into the Swirl if Swirl was successfully loaded in R.
You may want to re-install a different version of R to avoid this Swirl issue, and try again.

R CMD check warning in file.copy - missing DESCRIPTION file for unused package

I am writing a package and the R CMD check is throwing up the following errors:
* checking installed package size ... OK
Warning in file.copy(file.path(.Library, pkg, "DESCRIPTION"), pd) :
problem copying C:\R\R-31~1.2\library\lattice\DESCRIPTION to C:\Users\NEASTW~1\AppData\Local\Temp\Rtmp2pKOkh\RLIBS_2be867c654c\lattice\DESCRIPTION: No such file or directory
And
* checking loading without being on the library search path ...Warning in file.copy(file.path(.Library, pkg, "DESCRIPTION"), pd) :
problem copying C:\R\R-31~1.2\library\lattice\DESCRIPTION to C:\Users\NEASTW~1\AppData\Local\Temp\Rtmp2pKOkh\RLIBS_2be8205547c5\lattice\DESCRIPTION: No such file or directory
OK
The thing is, I am not using the lattice package anywhere within my package - to my knowledge. I have tried re-installing the lattice package to no avail. I think that the R CMD check is actually finishing ok and I don't have any WARNINGs or NOTEs, so I am not sure whether this would pass CRAN's checks?
This error came up as there was something wrong with my R installation. After re-installing it, the error was gone. Thanks goes to #hadley for helping with this issue.

Error in loadNamespace(name) : there is no package called 'RInside'

Error in loadNamespace(name) : there is no package called 'Rcpp'
...
Error in loadNamespace(name) : there is no package called 'RInside'
I get the above error when trying make on the examples of RInside.
RInside is in the user-library. So I set R_LIBS_USER to the directory in the Makefile.
R_LIBS_USER := "C:/users/Me/Documents/R/win-library/3.0"
but that does not work either.
Thanks for any advice.
EDIT:
It works fine if the packages are in "C:/R/R-3.0.2/library". R_LIBS_USER doesn't seem to work on Windows.
I fear this is local to your end.
If Rcpp and RInside are in fact in your default library location (and on Windows I sometimes copy them) then the examples build, as does the rest of the package. Recall that all this works for CRAN and the win-builder.
I was also having the same problem and read Dirk's reply and just ran
install.packages("Rcpp", dependencies = TRUE)
install.packages("RInside", dependencies = TRUE)
and it is working fine now.
I know the question was asked long back. But I faced the same problem while using R from python (Anaconda). Also I didnt find an reasonable explanation for it. Finally this is what worked for me.
import rpy2.robjects as ro
ro.r('''.libPaths('C:/Users/<remaining path>/R/win-library/3.1')''')
RSVM = importr('e1071')

Resources