Cannot find ‘RevoScaleR’ in Microsoft R Client - r

I have installed Microsoft R Client. When I run R from shell, I get
Microsoft R Open 3.4.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2018 Microsoft
Loading Microsoft R Client packages, version 3.4.3.0097.
Microsoft R Client limits some functions to available memory.
See: https://go.microsoft.com/fwlink/?linkid=799476 for information
about additional features.
Type 'readme()' for release notes, privacy() for privacy policy, or
'RevoLicense()' for licensing information.
Using the Intel MKL for parallel mathematical computing (using 36 cores).
Default CRAN mirror snapshot taken on 2018-01-01.
See: https://mran.microsoft.com/.
However, when I run R from Rstudio-server, I get only
Microsoft R Open 3.4.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2017 Microsoft Corporation
Using the Intel MKL for parallel mathematical computing (using 36 cores).
Default CRAN mirror snapshot taken on 2018-01-01.
See: https://mran.microsoft.com/.
The system only has one copy of R, and it together with the library path are correctly specified in rserver.conf
cat /etc/rstudio/rserver.conf
# Server Configuration File
rsession-which-r=/usr/bin/Revo64
rsession-ld-library-path=/opt/microsoft/rclient/3.4.3/libraries/RServer
Inside the Rstudio R environment, the library path is there
>.libPaths()
[1] "/home/xyz/R/x86_64-pc-linux-gnu-library/3.4"
[2] "/opt/microsoft/rclient/3.4.3/runtime/R/library"
However, RevoScaleR does not load automatically. When I try to load it manually, I get
> library(RevoScaleR)
Fehler in library(RevoScaleR) : es gibt kein Paket namens ‘RevoScaleR’
Anybody has an idea what may be wrong?

An answer from Github:
https://github.com/rstudio/rstudio/issues/2455#issuecomment-375327109
setting
R_LIBS_SITE=/opt/microsoft/rclient/3.4.3/libraries/RServer
in
/opt/microsoft/rclient/3.4.3/runtime/R/etc/Renviron

Related

first steps of R visual in Power BI

I'm just starting to use R visuals in Power BI, but I can't get it working
Whatever code I try I get this error:
error: could not find function "dir.exists"
Sample code:
As I don't use dir.exists, it seems somehow R can't even be started, however it seems it's set up properly:
RStudio is installed on my pc and it's running properly
I've just downloaded sample .pbix from Microsoft (https://learn.microsoft.com/en-us/power-bi/visuals/service-r-visuals) and it has the exact same error.
dir.exists was introduced in R 3.2 https://cran.r-project.org/bin/windows/base/old/3.2.0/NEWS.R-3.2.0.html
New function dir.exists() in package base to test efficiently whether one or more paths exist and are directories.
Consider upgrading to a more recent version of R.
I would recommend either current R from CRAN (4.0 at the time of this writing), or Microsoft R 3.4.4 to match the runtime in PowerBI Service https://learn.microsoft.com/en-us/power-bi/connect-data/service-r-packages-support
Current R runtime: Microsoft R 3.4.4
R from CRAN can be found at https://cran.r-project.org/ .
Microsoft R 3.4.4 can be found at https://cran.microsoft.com/bin/windows/base/old/3.4.4/
(edit 2021-02: now I'm in doubt, this seems to be R from CRAN as well. See https://mran.microsoft.com/release-history for previous versions of Microsoft R)

RevoScaleR package for Microsoft R Open 3.5.3

I've tried to install the RevoScaleR package within Microsoft R Open 3.5.3 but I get the message
"package ‘RevoScaleR’ is not available (for R version 3.5.3)"
which I suppose is clear enough. Is there any way around this? Or will I just have to drop back to an earlier version of MRO to get it to work? I need to use the rxGlm() function because the standard glm() function won't cope with the data I'm working with (size and complexity).
Thanks
Microsoft R Open does not include the proprietary R libraries. You can get these for free by using Microsoft R Client instead, which is Microsoft R Open with the addition of RevoScaleR built in. This package is not open source and cannot be installed into a regular R installation.
You can read more about the Client version: https://learn.microsoft.com/en-us/machine-learning-server/r-client/what-is-microsoft-r-client

RStudio not loading RevoScaleR on Ubuntu 16.04

Long story short:
Calling rxImport() works fine in a Terminal R session but fails when using RStudio, despite using the same installation of R.
Setup:
I'd like to use RevoScaleR functions like rxImport(...) on Ubuntu. I have an installation of RStudio and R done through package manager.
I've installed MS Rclient following the instructions here.
Everything seems to work as I can run in the terminal:
/opt/microsoft/rclient/3.4.3/bin/R$ ./R
R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
...
Microsoft R Open 3.4.3
The enhanced R distribution from Microsoft
Microsoft packages Copyright (C) 2018 Microsoft
Loading Microsoft R Client packages, version 3.4.3.0097.
Microsoft R Client limits some functions to available memory.
See: https://go.microsoft.com/fwlink/?linkid=799476 for information
about additional features.
...
Using the Intel MKL for parallel mathematical computing (using 2 cores).
Default CRAN mirror snapshot taken on 2018-01-01.
See: https://mran.microsoft.com/.
> R.home()
[1] "/opt/microsoft/rclient/3.4.3/runtime/R"
> rxImport()
Error in rxImport() : 'inData' must be specified.
So the function is loaded and available by default. Now I tell the RStudio to use this installation of R by adding the following at the end of ~/.profile :
RSTUDIO_WHICH_R="/opt/microsoft/rclient/3.4.3/bin/R/R"
Error:
When I run rstudio I get a R console in the IDE saying:
> R.home()
[1] "/opt/microsoft/rclient/3.4.3/runtime/R"
> rxImport()
Error in rxImport() : could not find function "rxImport"
Possible causes
I've found some threads with people complaining about MS packages not dealing properly with ~ and working directory (i.e. on a remote server), setwd() doesn't solve my issue, though.
Do you have any ideas on how to get RevoScaleR to work with RStudio? Thanks in advance.
An answer I got from Github:
https://github.com/rstudio/rstudio/issues/2455#issuecomment-375327109
try setting
R_LIBS_SITE=/opt/microsoft/rclient/3.4.3/libraries/RServer
in
/opt/microsoft/rclient/3.4.3/runtime/R/etc/Renviron

how can I find the base R installation on ubuntu?

I installed both the Microsoft R Open and base R (CRAN) on my linux desktop. But I can't find where my base R was installed now. Is there a way I can find this out?
When I type R in terminal I get the following because /usr/bin/R points to my MRO install.
Microsoft R Open 3.2.3
Default CRAN mirror snapshot taken on 2016-01-01
The enhanced R distribution from Microsoft
Visit http://go.microsoft.com/fwlink/?LinkID=722555 for information
about additional features.
Multithreaded BLAS/LAPACK libraries detected. Using 4 cores for math algorithms.
[Previously saved workspace restored]
> R.home()
[1] "/usr/lib64/MRO-3.2.3/R-3.2.3/lib/R"
I just want to know how I can access my CRAN R install again.
Thanks!

Why does adding a Depends argument to a package DESCRIPTION cause it not to be compiled for versions after the specified one?

I've just released a package to CRAN which has the following line in the DESCRIPTION file:
Depends: R (>= 2.12.0)
I have never used such a line in a package DESCRIPTION file before, and never had any troubles.
I received the following message a few hours ago, as is typical for CRAN releases:
Dear package maintainer,
this notification has been generated automatically.
Your package maRketSim_0.9.tar.gz has been built for Windows and
will be published within 24 hours in the corresponding CRAN directory
(CRAN/bin/windows/contrib/2.13/).
R version 2.13.1 Patched (2011-07-20 r56455)
All the best,
Uwe Ligges
(Maintainer of binary packages for Windows)
Now with this package, install.packages(maRketSim) on Windows in R 2.13.1 returns:
In getDependencies(pkgs, dependencies, available, lib) :
package ‘maRketSim’ is not available (for R version 2.13.1)
The same error occurs in R 2.13.0 on Windows.
Yet the install works just fine in R 2.12.2 on the same machine.
Did including the Depends line mess things up?
It works for me on Linux. CRAN says that there are currently no binary builds for Windows or MacOS X. What system/OS were you trying the install on when it failed.
Uwe's (automated) message does mention that it might take up to 24 hours for the new build to reach CRAN and thence out to whatever mirror you are using.
And this does appear to be the issue: there is a binary for maRketSim in http://cran.r-project.org/bin/windows/contrib/2.12/ but not yet in http://cran.r-project.org/bin/windows/contrib/2.13/
You just need to wait a little while before you can install the binary for the 2.13.x branch of R/

Resources