First time posting, hoping not to mess it up. I cannot seem to download packages in Rstudio on Windows. I have tried several packages (R markdown, xfun, htmlTable, sjPlot, Knitr, etc.) and get the same error each time:
installing source package 'htmlTable' ...
** package 'htmlTable' successfully unpacked and MD5 sums checked
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.13 is being loaded, but >= 0.15 is required
ERROR: lazy loading failed for package 'htmlTable'
removing 'C:/Users/seaso_000/Documents/R/win-library/3.5/htmlTable'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘htmlTable’ had non-zero exit status
I have seen advice on this forum and have tried the following: downloading developer version from CRAN, updating packages, updating Xfun, updating R markdown, etc. Most of the advice seems to be for MAC OS, but tried anyway but did not work. I also tried installing with dependencies = TRUE which also did not work. This is happening for almost every program I tried to download.
I don't know how to produce a reproducible example as it is all package loading. Any advice would be appreciated. I recently downloaded Ubuntu to my computer (would this interfere?). I also know that knitr dependencies (required for markdown and other packages) were removed from CRAN, could this cause the issue?
I'm at a total loss. Thank you for any help you can provide.
There is a conflict in installation because a version is already loaded. This is very often the case on WINDOWS too where there are some DLL being lock.
I would advice to closes all opened R and RStudio and then install.packages("xfun") from a new R session with nothing loaded (if possible opened with R GUI and not RStudio).
Thank you, I tried that but it did not work. I get the same error when following these instructions. I am considering uninstalling/re-installing R and R studio as so many packages are impacted.
Are you install htmlTable from github ?
On Windows, it should install the binary. It is why I asked.
I tried with install.packages("htmlTable") on Windows and not issue.
if you still have the same issue
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
namespace 'xfun' 0.13 is being loaded, but >= 0.15 is required
It means may still have on session opened with old xfun loaded. When you tried you had all sessions closed before and used R Gui (not RStudio) to install ? and only install xfun with
install.packages("xfun")
Once you get the last xfun (0.19), you should be able to install htmlTable