Timitrov
Timitrov

Reputation: 221

Error while installing package kableExtra in 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!

Upvotes: 4

Views: 15177

Answers (2)

mischva11
mischva11

Reputation: 2956

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.

Upvotes: 3

Marco
Marco

Reputation: 4290

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.

enter image description here

enter image description here

Upvotes: 0

Related Questions