I first noticed a problem when every time I saved a Rmarkdown package it was saved as a raw notes file, I found I could not save markdown packages at all. After updating R to the latest version using the download RStudio-1.4.1106 I found I could not even open a new markdown file.
I get the error that I need to install the latest versions of knitr, markdown, xfun and tinytex. I have tried to install them. I have installed them using the automatic download system, by typing in install.packages or by going through the tools->install packages function.
I get the error:
> install.packages("rmarkdown")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/Ella Bruce/Documents/R/win-library/3.5’
(as ‘lib’ is unspecified)
also installing the dependencies ‘knitr’, ‘tinytex’, ‘xfun’
There are binary versions available but the source versions are later:
binary source needs_compilation
knitr 1.28 1.31 FALSE
tinytex 0.22 0.30 FALSE
xfun 0.13 0.21 TRUE
rmarkdown 2.1 2.7 FALSE
Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/xfun_0.13.zip'
Content type 'application/zip' length 184719 bytes (180 KB)
downloaded 180 KB
package ‘xfun’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\Ella Bruce\AppData\Local\Temp\RtmpIDt8HA\downloaded_packages
installing the source packages ‘knitr’, ‘tinytex’, ‘rmarkdown’
trying URL 'https://cran.rstudio.com/src/contrib/knitr_1.31.tar.gz'
Content type 'application/x-gzip' length 891732 bytes (870 KB)
downloaded 870 KB
trying URL 'https://cran.rstudio.com/src/contrib/tinytex_0.30.tar.gz'
Content type 'application/x-gzip' length 28839 bytes (28 KB)
downloaded 28 KB
trying URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.7.tar.gz'
Content type 'application/x-gzip' length 3215356 bytes (3.1 MB)
downloaded 3.1 MB
* installing *source* package 'knitr' ...
** package 'knitr' successfully unpacked and MD5 sums checked
** R
** demo
** 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.19 is required
ERROR: lazy loading failed for package 'knitr'
* removing 'C:/Users/Ella Bruce/Documents/R/win-library/3.5/knitr'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘knitr’ had non-zero exit status
* installing *source* package 'tinytex' ...
** package 'tinytex' successfully unpacked and MD5 sums checked
** R
** 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.19 is required
ERROR: lazy loading failed for package 'tinytex'
* removing 'C:/Users/Ella Bruce/Documents/R/win-library/3.5/tinytex'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘tinytex’ had non-zero exit status
ERROR: dependencies 'knitr', 'tinytex' are not available for package 'rmarkdown'
* removing 'C:/Users/Ella Bruce/Documents/R/win-library/3.5/rmarkdown'
In R CMD INSTALL
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\Ella Bruce\AppData\Local\Temp\RtmpIDt8HA\downloaded_packages’
This only seems to happen for packages related to Rmarkdown as I have managed to reinstall other packages and successfully installed new packages.
I would really appreciate some help in working out what is going wrong here.