Error: installing tinytex (tinytex::install_tinytex()) in rstudio - r

I am trying to knit reports to pdf documents in rstudio.
I have successfully installed rtools and added it to my PATH, and also installed rmarkdown and tinytex. However whenever I run tinytex::install_tinytex() the following error about tlmgr is thrown.
Error in system2("tlmgr", args, ...) : '"tlmgr"' not found
xfun::session_info('tinytex')
R version 4.1.0 (2021-05-18) Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19042), RStudio 1.4.1717
Package version: graphics_4.1.0 grDevices_4.1.0 stats_4.1.0
tinytex_0.32 tools_4.1.0 utils_4.1.0 xfun_0.23
I have installed tinytex with mush more relative ease in the past and have now tried this a gazillion times without any joy. Please any help will appreciated on this or at least a great guide on how to render tables in word(.docx) outputs.

I don't really know how I did this but let me just mention the obvious steps for anyone who meets such errors in the future.
I deleted everything, R and RStudio folders and emptied all folders from the recycle bin.
Reinstalled R
Reinstalled RStudio
Installed rmarkdown
Then tinytex::install_tinytex()
See the thing is I had done this a thousand times and I don't really know why this works now, but hey it's a free and new program, R.
And I will keep this open incase of any serious explanations and thanks for those that at least tried to help.

Related

knit to PDF not working R V4.0.0 RStudio V1.2.5042

Unable to get RStudio to knit to PDF post-RV4.0.0 update HTML, WORD work).
Error returned: Searching for luatex.dll, which does not seem to install following (i) install.packages('tinytex') (ii) tinytex::install_tinytex().
Curiously, luatex.dll is found in my older 3.5.3 and 3.6.3 .\TinyTeX\bin\win32 directories. rTools is current for R4.0.0, with path added per website. Similarly, pdflatex.fmt mising in install from 4.0.0. In all cases followed advice from Yihui Xie et al. websites.
Have tried several re-installs, including a full install of MikTeX. No joy.
tinytex Version is 0.22. basic session info is:
sessionInfo()
R version 4.0.0 (2020-04-24)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)
I am puzzled because I have successfully installed tinytext etc on 3.X.X R and previous versions of RStudio, and knited PDFs (including use of bookkdown) with no problems. Thx in advance.

RStudio Install Packages and Package Updates both download then fail with cannot open file

Running happily with R 3.4 and RStudio 1.0.143 under Win10 this problem occured bringing project development to a halt. Downloads each occur and are unzipped and then the a presumably first file in the first item gets:
Error in install.packages : cannot open file 'C:/Users/Admin/Documents/R/
win-library/3.4/file30504386b80/rJava/javadoc/resources/background.gif':
Permission denied
and the prompt returns.
Updating to R version 3.4.1 (2017-06-30), RStudio Version 1.0.153 was to no avail. Using the OS to remolve all R versions and trying again with 3.4.1 did not work. Removing R again and deleting the R directory to refresh the library did not work. My virius software like to tell how helpful it has been and has not, so that issue seems unlikely.
Giving the user full control of the R library did not help.
could package-updates be a tag like install-updates?
It looks there is a problem between Java and rJava.
You should try reinstalling Java using chocolatey package manager (https://chocolatey.org/) and then reinstall rJava package.
I had a similar issue two weeks ago on a windows laptop.
I had this problem for a long time. only in RStudio.
Install the package on R and Library it. Go to RStudio and require the package.
It works!

updating both Rprofile and R to the same version

Is there any idea, how I can find the version of my Rscript?
The issue is, once I am running R in mac terminal, the version is 3.2.2 but running via Rscript the version is changed to 3.0.2. I would like to know how to update my Rscript's version!
I cannot comment, because I have less than 50 rep, so I'm writing here.
Are you under macOS Sierra?
When I upgraded R to version 3.4.0 after upgrading my Mac to macOS 10.12 (Sierra) I had some problems with rJava. While I searched for a solution, I also noticed that the R version numbers displayed in the GUI and the terminal differed. I am not quite sure what that problem was, but part of my solution was to completely uninstall R (note the comments about using which R !).

R: install.packages() doesn't work nor produce an error message

I am running R version 3.1.3 (2015-03-09) with RStudio 0.98.1103 under OS X 10.10.2 (Yosemite). I migrated to this machine recently and moved files and applications (R and profile files included) with OS X Migration assistant.
R has worked perfectly until I tried to install.packages(). The function initiates but it doesn't produce any printout or terminate. I tried different things:
I removed my .Rprofile file which indicates my package folder and restart R;
I tried different mirrors with install.packages('RMySQL', repos='http://cran.us.r-project.org');
I tried install.packages() both from shell and from R GUI;
I tried to upgrade all packages with RStudio.
I never encountered an error message of sort and none of the above worked or produced any result.

R version doesn't support quartz graphic device - RStudio won't plot

I'm running Mac OS Maverick.
In my previous setup, the plots would correctly display on the plot tab on RStudio.
I reinstalled R with homebrew and, when I use RStudio, it gives me the following warning
WARNING: The version of R you are running against does not support the
quartz graphics device (which is required by RStudio for graphics).
The Plots tab will be disabled until a version of R that supports
quartz is installed.
When I plot something, it opens up the XQuartz app on my mac. It does display the graphs (sometimes with weird colors though), but I'd really like it to plot in RStudio itself.
Is it that homebrew has a version of R that doesn't support the quartz graphics device or have I messed up something elsewhere?
As always, any help will be very much appreciated.
Some details of my setup:
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
RStudio Version 0.98.1091
Platform: x86_64-apple-darwin13.4.0 (64-bit). Mac OS 10.9.5
I installed R with homebrew the following way
brew tap homebrew/science
brew install r
Previously I had installed tcl/tk the following way
brew tap homebrew/dupes
brew install tcl-tk --with-tk
I run into the same issue.
According to the R brew formula history the last bottled version (i.e. precompiled version, which is what is installed by default) isn't run against aqua due to some bug so the installation of R has no aqua capabilities, which is what RStudio graphics device requires.
After trying to understand the formula logic I figured that if built from source:
brew install r --build-from-source
it would compile with clang (check brew --env) and therefore correctly build against aqua. It takes a little longer to install but it worked for me. To check, from the terminal open R and see capabilities() aqua should be TRUE for RStudio's graphics device to work.
I'm using homebrewed R and Rstudio on Yosemite. I ran into the same problem, probably after I had updated R from ver. 3.1.2 to ver. 3.1.2_1.
My ad-hoc solution is
to brew uninstall R, and
to install R from CRAN.
RStudio display graphs inside its window when I use CRAN version of R. However, this is not the best solution to me, because I love to manage all unix packages using homebrew to avoid possible conflicts.
I ran into this problem too. I previously had homebrewed R installation with a working quartz graphic device, which comports with others in this thread who suggest that an update to homebrew's R script caused the problem.
I can confirm that daniel's answer works. I tried brew install r --build-from-source and quartz() has stopped throwing errors.

Resources