R Markdown stops working, after installing MRO - r

I've been building an HTML document with RMarkdown, and everything was going ok, until I installed Microsoft R open (3.3.2) and now everytime I try "Knitr HTML" it returns the following:
Error : .onLoad failed in loadNamespace() for 'RevoUtilsMath', details:
call: NULL
error: To use RevoUtilsMath you must first install the MKL Math Library.
Visit http://mran.revolutionanalytics.com/download.
If you have previously installed the MKL Math Library,
remove it using Add/Remove Programs, then re-install.
Error: package or namespace load failed for 'RevoUtilsMath'
Execution halted
I also re-installed the MRO, just to understand if something went wrong during the installation, and it still returns that error.
I was wondering if someone had the same difficulty and would like to share how to fix this. I have no idea on how installing MRO has such an influence in R markdown.

It looks to me like this isn't necessarily an issue with RMarkdown, but a compatibility issue with RevoUtilsMath and the MKL libraries. It's referenced on the github for RRO (which Microsoft acquired and is now MRO) here:
https://github.com/RevolutionAnalytics/RRO/issues/152
I haven't experienced the error myself, but there is a google group which references and solves that issue here:
https://groups.google.com/forum/#!topic/rropen/jKfR40DcIbE
The third response down is the users solution, and just below that is a microsoft support rep explaining how to properly setup MKL and RevoMathUtils. Hope that helps!

Related

How to install a Julia package if it fails to install / build on an M1 Mac?

I am trying to use the Twitter.jl package locally on my M1 Mac. However, when I try to install it, I get:
ERROR: Error building `DecFP`:
┌ Warning: Platform `arm64-apple-darwin21.2.0` is not an officially supported platform
└ # BinaryProvider ~/.julia/packages/BinaryProvider/U2dKK/src/PlatformNames.jl:450
ERROR: LoadError: KeyError: key "unknown" not found
DecFP looks like it's an up to date Julia package so I am not sure what the issue would be in this case.
I would like to get a general set of steps to resolve issues like this since I know this package isn't the only one that will have installation issues so hopefully this can be used to help others who have similar issues.
The issue is that Twitter.jl is pulling an old version of OAuth.jl which doesn't work on the M1. I have opened a PR so it pulls a newer version and it should work.
About these cases in general the steps are identifying what package is using BinaryProvider, in this case it's an old MbedTLS that was pulled by an old OAuth. The solutions are, if there is a newer version, change the compat bounds, and if there isn't then one has to build the needed binary using BinaryBuilder.jl and change the dependent packages to use it.
In most cases just opening an issue in github should be enough :).

Vignette fails to be built by pkgdown

I have a R package that I am trying to setup pkgdown for. I'm following the instructions here, and am running build_site() to generate the docs directory. When running this command, I get the error
Quitting from lines 28-29 (Data-Model.Rmd)
Error : package or namespace load failed for 'dm':
.onLoad failed in loadNamespace() for 'dm', details:
call: register_pkgdown_methods()
error: rlang::is_installed(c("DiagrammeR", "DiagrammeRsvg")) is not TRUE
Showing that the build is failing when trying to render one of the vignettes. However, if I just try to knit this vignette in a fresh interactive session, it knits fine.
I have tried including DiagrammeR and DiagrammeRsvg in Depends, Imports, or Suggests, and it still fails with the same error.
Any idea what I can do to fix this? The vignette is located on my github here. I understand this is not the ideal way to share an example, but it can repro'd by cloning the repo and running pkgdown::build_site()
The error is fairly informative; it tells you that
rlang::is_installed(c("DiagrammeR", "DiagrammeRsvg"))
is not TRUE. I suspect if you run that line it will in fact return FALSE. I installed DiagrammeRsvg and the vignette built successfully.
I am not entirely sure why building the vignette with pkgdown requires SVG export of your diagrams, but knitting them doesn't. Hopefully that solves the issue, though.

the code execution cannot proceed because kpathsea631.dll was not found

I failed to compile a R Markdown file and the error message is "The code execution cannot proceed because kpathsea631.dll was not found".
I updated the Visual C++ Redistributable and reinstalled R, Rstudio and MiKTeX. All of these methods failed. Could any help me with this?
I am using Win10 system.
I got the same error message using TinyTex instead of MiKTex. Like you, I also deinstalled very much and installed it again but I think basically it is already sufficient to reinstall TinyTex (as long as the error message stems from pdflatex.exe).
So, remove.packages("tinytex"), go to the folder C:/Users/username/AppData/Roaming/TinyTex and make sure you delete/deinstall it as well.
When installing tinytex again, make sure you follow the steps explained here: https://yihui.org/tinytex/

Unable to load Rcpp package

Due to my company's firewall I am manually installing packages from local. No errors when building the package from terminal, but I get an error when I load the package using library function
unable to load shared object 'C:/Program Files/R/R-3.6.1/library/Rcpp/libs/x64/Rcpp.dll':
LoadLibrary failure: The specified procedure could not be found.
And it also throws a prompt
Any help is appreciated thanks!
Tried:
Error in inDL(x, as.logical(local), as.logical(now), ...) : unable to load shared object
https://github.com/r-lib/rlang/issues/306
None of the above seemed to work
I had this issue. I was using R 4.0.0 in RStudio (1.2.5042). I had been using R just fine all morning and continually had this issue all afternoon. I restarted my computer, updated my packages, and confirmed everything worked well on another computer. Finally I updated to R 4.0.2 and my issue resolved.
My binary package was correctly pathed to 4.0/Rcpp. I still don't know what caused the issue, but since this seemed to fix it hope it will for any future folk with this issue!
There has been a significant change in the build tools used for binary R packages on Windows:
Starting with R 4.0.0 (released April 2020), R for Windows uses a brand new toolchain bundle called rtools40.
https://cran.r-project.org/bin/windows/Rtools/
This means one has to be extra careful to get the correct file when downloading binary packages from CRAN, since packages for build with incompatible build tools will not work. At the time of writing this means:
Use the ones for r-oldrel for R 3.6
Use the ones for r-release for R 4.0
When this question was asked, R 4.0 was still r-devel.
You do not have to think about this things when using the build in install.packages() instead of manually downloading files from CRAN.

JavaGD fails to load

Could someone please help.
I had Deducer working with R 2.14 but now that I have updated to 2.15.1 I can't get JGR to load. I have loaded JGR and Deducer.
This is the message I get when installing
Loading required package: JavaGD
Error : .onLoad failed in loadNamespace() for 'JavaGD', details:
call: .Call("RegGetStrValue", c(key, "CurrentVersion"), PACKAGE = "JavaGD")
error: C symbol name "RegGetStrValue" not in DLL for package "JavaGD"
Error: package ‘JavaGD’ could not be loaded
I have removed all old versions of R and Ver 2.15.1 - reinstalled R and still get this message.
Is it possible that this is a Registry problem and if so where should I look.
I have searched and although there seem to be simiar reported issues, none are exactly the same from the ones that I have seen. I certainly dont seem to have m,ultiple versions of JavaGD in my library and the Namesake file is in the folder JavaGD.
I am running Win 7 32 bit ver on fairly current Dell Laptop.
R seems to work fine and I am using R-Studio most of the time and that works fine as well.
Any help would be appreciated
7 years on form the OP's original issue choosing the right Java Download is critical for 64-bit machines which most of our RStudio environments are synced to work with. For whatever reason, downloading the 64-bit JRE is difficult. To avoid the same error presented by Deducer more recently be sure to download the 64-bit Java JRE from https://www.java.com/en/download/manual.jsp. Note, the 64-bit version must be downloaded offline as instructed (usually bottom of Windows downloads). Check that the installation path is c:\Program Files\Java and not c:\Program Files(x86)\Java. That plus the JDK should fix this problem going forward.

Resources