Error while installing package kableExtra in R - r

I am trying to install kableExtra and get the following errors:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck =
vI[[j]]) :
there is no package called 'hms'
ERROR: lazy loading failed for package 'kableExtra'
*removing 'C:/Users/Tim/Documents/R/win-library/3.2/kableExtra'
Warning in install.packages :
running command '"C:/PROGRA~1/R/R-32~1.5/bin/x64/R" CMD INSTALL -l "C:\Users\Tim\Documents\R\win-library\3.2"
C:\Users\Tim\AppData\Local\Temp\RtmpUJQfwD/downloaded_packages/kableExtra_0.9.0.
tar.gz' had status 1
Warning in install.packages :
installation of package ‘kableExtra’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Tim\AppData\Local\Temp\RtmpUJQfwD\downloaded_packages’
How can I solve my problem? Thanks in advance!

it seems kableExtra depends on the package "hms" so try install it before with:
install.packages("hms")
or via rstudio interface:
packages -> install
and type in "hms"
also try this command:
install.packages("kableExtra", dependencies = TRUE)
If there appear problems like installing rlang or something similar, there is no general solution for this. You can try to (re)install rtools. Sometimes there are missing parts of r installations. My guess if R can't install a dependencie is, that some library or tools of the R environment are missing or wrongly installed which have to be detected.

You have a trouble with the dependency with the package "hms". I have not got how you are installing the r package, but you can either install it first and then try it again or start the installation with the option of download and install all required dependencies, in the second option you need to be online and allow the package manager to intall what is required.
Here is how it looks in RGui. I guess your are not using RGui.

Related

Truble loading 'Hmisc' [duplicate]

I'm unable to load the car package in R. I tried reinstalling using
install.packages("car",dependencies=TRUE)
both from R and RStudio. I tried installing quantreg as advised in another post and then installing it again. Installation appears to be successful, but simply can't load the program.
Here's the complete error:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘pbkrtest’
In addition: Warning message: package ‘car’ was built under R version 3.2.3
Error: package or namespace load failed for ‘car’
This was just bumped to the homepage by Community. I can't take credit for the answer, but to give it a real non-comment answer:
You should upgrade R first. Then run update.packages(checkBuilt = TRUE). Finally, try again install.packages("car", dependencies=TRUE). If it doesn't work, try to install package pbkrtest first. - user3710546
Given that the current version of R at the time the question was posted was 3.2.3, I think that was a good answer.
I got the same error. (I am using R 3.2.2) Please perform the following steps in sequence (after that try to activate installed caret package):
install.packages("lme4", repos="http://cran.rstudio.com/",type = "binary", dependencies=TRUE)
install.packages("nlme", repos="http://cran.rstudio.com/",type = "binary", dependencies=TRUE)
packageurl <- "https://cran.r-project.org/src/contrib/Archive/pbkrtest/pbkrtest_0.4-4.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
No need to upgrade R. I am still using R 3.2.2. I performed these steps and it worked for me.

Errors installing/loading package ‘adespatial’

I am trying to run the dbmem function on a large dataset using the adespatial package, but cannot get it to install. When I run install.package("adespatial), I get this message:
package ‘adespatial’ is available as a source package but not as a binary.
Why can't I install this package as a binary and how do I go about getting this package installed on my Mac (OS sierra version 10.12.6). I am running R studio with R version 3.1.2
Update
I also tried running
install.packages("adespatial",type = "source")
however when I try to load the library it still says the library is not found. There were also many errors in the install. I updated my version of R to 3.4.4 and now it will install with a few errors, but the library still will not come up.
When I attempt to load the library (library(adespatial)), I receive this error:
Error: package or namespace load failed for ‘adespatial’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘curl’
Bit hard to replicate your problem, but try to install curl; either the R package:
install.packages("curl")
or directly on your OS (can't help there, sorry, never had an OS).
Anyway, if package installation fails in R, it throws an (or more) error message(s). In your case, they will point to missing packages. Rerun install.packages("adespatial") and see there.

Some Packages not Running on R Version 1.0.153 [duplicate]

I had everything working with R and RStudio, but then I moved the folders when cleaning up my computer directories & files. Now I'm getting the error message below.
Should R and RStudio be installed under Program Files or Program Files (x86)? Should I have two libPaths?
install.packages("C:/Users/kevin/Downloads/fpp_0.5.zip", repos = NULL)
## Warning in install.packages :
## package ‘C:/Users/kevin/Downloads/fpp_0.5.zip’
## is not available (for R version 3.0.0)
## Installing package into ‘C:/Users/kevin/Documents/R/win-library/3.0’
## (as ‘lib’ is unspecified)
## package ‘fpp’ successfully unpacked and MD5 sums checked
library("fpp", lib.loc="C:/Users/kevin/Documents/R/win-library/3.0")
Loading required package: forecast
## Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
## there is no package called ‘colorspace’
## Error: package ‘forecast’ could not be loaded
When you install the package using the RStudio package installer or directly from CRAN, it doesn't install the dependencies ("fracdiff", "Rcpp", "RcppArmadillo" and "colorspace") and hence, R keeps throwing the load namespace error. Installing the package through, automatically installs all the dependencies and solves this problem.
install.packages("forecast",
repos = c("http://rstudio.org/_packages",
"http://cran.rstudio.com"))
The last time I encountered a very similar problem, I used this code which I got somewhere:
install.packages("package's name", repos=c("http://rstudio.org/_packages", "http://cran.rstudio.com"))
simply put your package's name in the quotation marks.
Hope this helps.
Use this:
install.packages("colorspace", dependencies = TRUE)
I ran into this problem. It turned out that my .Rprofile had calls to a package that was not installed. Removing these lines allowed installation to proceed normally.
I got this error while installing the library 'tidyverse'. Removed the error by upgrading R from v3.4 to v3.6

Installing tm package in R

I am facing problem while installing tm package in r version 3.2.3. I have tried implementing different ways available in internet and the stack overflow answers. I don't know where I am going wrong.
It shows
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace ‘slam’ 0.1-32 is being loaded, but >= 0.1.37 is required
ERROR: lazy loading failed for package ‘tm’
* removing ‘/home/alankrita/R/x86_64-pc-linux-gnu-library/3.2/tm’
Warning in install.packages :
installation of package ‘tm’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpPSKOOW/downloaded_packages’"
Any help will be appreciated. :)
I solved this problem by upgrading my version of R to the latest version, and then trying the install tm package again. If you're on Linux you can do this quite easily by adding the Cran site to your repository list, and then updating your version of r-base.
For Ubuntu users a good description of adding the Cran repo can be found here. Once you've pointed your system to the Cran repo the upgrade of the r version can be achieved with:
sudo apt-get install r-base

lib unspecified & Error in loadNamespace

I had everything working with R and RStudio, but then I moved the folders when cleaning up my computer directories & files. Now I'm getting the error message below.
Should R and RStudio be installed under Program Files or Program Files (x86)? Should I have two libPaths?
install.packages("C:/Users/kevin/Downloads/fpp_0.5.zip", repos = NULL)
## Warning in install.packages :
## package ‘C:/Users/kevin/Downloads/fpp_0.5.zip’
## is not available (for R version 3.0.0)
## Installing package into ‘C:/Users/kevin/Documents/R/win-library/3.0’
## (as ‘lib’ is unspecified)
## package ‘fpp’ successfully unpacked and MD5 sums checked
library("fpp", lib.loc="C:/Users/kevin/Documents/R/win-library/3.0")
Loading required package: forecast
## Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
## there is no package called ‘colorspace’
## Error: package ‘forecast’ could not be loaded
When you install the package using the RStudio package installer or directly from CRAN, it doesn't install the dependencies ("fracdiff", "Rcpp", "RcppArmadillo" and "colorspace") and hence, R keeps throwing the load namespace error. Installing the package through, automatically installs all the dependencies and solves this problem.
install.packages("forecast",
repos = c("http://rstudio.org/_packages",
"http://cran.rstudio.com"))
The last time I encountered a very similar problem, I used this code which I got somewhere:
install.packages("package's name", repos=c("http://rstudio.org/_packages", "http://cran.rstudio.com"))
simply put your package's name in the quotation marks.
Hope this helps.
Use this:
install.packages("colorspace", dependencies = TRUE)
I ran into this problem. It turned out that my .Rprofile had calls to a package that was not installed. Removing these lines allowed installation to proceed normally.
I got this error while installing the library 'tidyverse'. Removed the error by upgrading R from v3.4 to v3.6

Resources