RExcel in R 3.0.x - r

RAndFriends, which includes all the items needed to run RExcel, includes just R 2.15.2.
I am currently using the latest version of R but rcom 2.3.1 and rscproxy 2.0.5, which I am currently using, do not allow me to start an R server within Excel.
Setting foreground R server whithin Excel returns a fatal error and R rejects any connection with Excel via rcom.
I get two error messages:
R Server not available
There seems to be no R process connected to Excel
The main difference with a running RExcel session is that in the latter you may see rscproxy and rcom to be loaded when you start a RExcel session.
Is there anyone who is currently using RExcel with R 3.0.1 who can explain me how he succeeded in running it (step by step)?

Found it on statconn's Wiki section.
Assuming you have a suitable version of R installed, the following steps are necessary to install RExcel and the infrastructure. You need to be logged into Windows with administrator privileges to do this!
You also need to follow these instructions if you upgrade R, i.e. you install a new release of R after you have installed RExcel.
Download the statconn DCOM server and execute the program you downloaded.
Start R as administrator (on Windows 7 you need to right-click the R icon and click the corresponding item).
In R, run the following commands (you must start R as administrator to do this).
Commands:
install.packages(c("rscproxy", "rcom"), repos = "http://rcom.univie.ac.at/download", lib = .Library)
library(rcom)
comRegisterRegistry()
Now you have rcom installed, but RExcel is not installed yet.
To install RExcel: download the RExcel installer and run this installation program. Installing RExcel this way will set the background server of R as the default R server for RExcel. You can change this in the configuration settings in R. If you want to set the foreground server as the default site wide server, there is an appropriate option in one of the dialogs of the installation.
The RExcel installer modifies one of the configuration files of R, the file Rprofile.site, usually found at a location like C:\Program Files\R\R-2.13.1\etc\Rprofile.site.
If you do not install RExcel and want the package rcom to be loaded into R each time you start it, you have to add the line
library(rcom)
to Rprofile.site. You have to start your editor as administrator to be able to modify this file.

I thint that focus of those instuctions are on "Assuming you have a suitable version of R installed". R 3.0.1 do not work with RExcel.

I have noticed all development of Rmetrics products have ceased development since Diethelm Wuertz untimely passing, some of his associates on the team maintain it, but further development stopped abruptly after Diethelm Wuertz the project leader and main inspiration behind the team, died in a car accident in 2015, that is how long it has been since any serious development has occurred on Rexcel and all the range of Rmetric products, it is a real tragedy they are still cutting edge 6 years after Diethelm's passing, he would be sad to see his legacy slowly die. I am looking at xlwings and converting not too difficult code to python for speed and power, as far as many great R libraries go, I have not the time to reinvent the wheel within python, it is not a labour of love for me.

Related

R (and Bioconductor) cant install packages "path not writable/access denied"

I am using R again after some time and need to install various packages (e.g. lumi, GENAVi, ideal, limma) and for some the installation works for some not. I receive failure notifications indicating that I the library paths are not writable or that access is denied.
installation of lumi with bioconductor fails
thus, lumi appears to be not existing
My PC uses windows 10, recently updated, and R 4.1.1
I tried the following steps (based on older forum entries):
I ran R Studio with administrator permissions
I gave R full permission through the firewall of my antivirus program
I gave R permission through the windows security settings
I reinstalled R on another harddrive (E:/) where it should have full permission for all paths.
I added a path in the xxx
I ran R inside a new environment in the “Conda” software, but the permission problems persisted.
(Outside of Conda) I installed the lumi package out of a zip file (instead of a Bioconductor download). Still didnt work...
So I now don’t know what to do anymore and barely find new ideas for solving the problem.
I appreciate your help

Disabling package install feature from R GUI and RStudio

We have our R and RStudio Desktop running on individual users Windows 7 desktops and all the users are getting the required packages from our local R package repository. No, i am trying to see if there is a way to block users from access to external CRAN repository mirrors.
Editing "C:\Program Files\R\R-3.3.2\etc\repositories" files and making CRAN point to our local repository URL is helpful but this will only work as long as users are not trying to exercise R GUI Packages-> install packages or set CRAN mirrors options.(CRAN variable is getting over ridden as and when R GUI options are exercised. )
This is the reason i am truing to see if there is a way to disable R GUI and/ or R Studio Package install GUI options?
I didnt find any help how to do it on R GUI without modifying the source code, but RStudio seem to have an environment variable which is supposed to disable this option but is not working for me.
As per this link setting "RSTUDIO_DISABLE_PACKAGES" environment variable should do the trick but setting this variable to 1 on below locations doesnt do anything.
C:\Program Files\R\R-3.3.2\etc\Renviron.site
C:\Program Files\R\R-3.3.2\etc\x64.Renviron.x64
Also, I found below text on RStudio admin guide but don't know what are the equivalent files and folders for windows environment and whether or not this is applicable to RStudio desktop
/etc/rstudio/rsession.conf
allow-package-installation=0

'Malformed' Error on R package check with --as-cran. Package built with Rstudio

A few months ago I launched the 'table1xls' package, built using Rstudio. Since then some revisions have naturally accumulated. I wanted to share the revisions on CRAN in time for the R 3.1.0 rollout.
The problem is, for a couple of months now the --as-cran check option is giving me this annoying error:
* checking CRAN incoming feasibility ...Error: Line starting '<HTML><HEAD><TITLE>C ...' is malformed!
Now, I have no HTML in my package, nor any files that compile into HTML format. My work desktop (where this error occurs) is behind a firewall that requires the --internet2 flag when launching R, but Rstudio seems generally unfazed by that.
I saw this question pop up here and there, including on Rstudio's support pages where it remains unanswered. Any insight will be gratefully accepted.
Btw, my package is available on GitHub, user name "AssafOron". I wonder whether users can install it directly via devtools::install_github.
Oh, forgot to add: I'm using Windows (it's still XP over here) and this error is on the 3.1.0 alpha. But the same error was present with 3.0.2 as well. My top 2 suspects are something with Rstudio, or the firewall.
That looks very much like a proxy issue.
A simple fix: upload the package to win-builder where you can test against the released version of R as well as the development version. If they do not flag anything ... then you know you;re good.
Else, go to a local Starbucks or public library and use different connectivity.

How do I get Rtools 3.0 working for R 3.0? R can't find the installation

I'm trying to get R to recognize that I have installed Rtools.exe. I've tried installing it in several different locations. However, whenever I restart R and load devtools I get the same error:
> library(devtools)
WARNING: Rtools is required to build R packages, but is not currently installed.
Please download and install Rtools 3.0 from http://cran.r-project.org/bin/windows
/Rtools/ and then run find_rtools().
Naturally, whenever I try the function find_rtools() I get the same error message. I'm done trying to figure this out with help files, as the devtools help doesn't offer much. I've tried installing in several of the locations returned by get_path() but the problem persists.
FYI, currently my R is installed at D:/R.
Has anyone else had this problem, and more importantly, can anyone help me?
I'm sorry if this is a duplicate, and I've tried to include as many relevant details as possible so if you need any clarification please let me know.
Thanks,
Nick
Grab the batch file Rpathset.bat from batchfiles, edit the SET statements in it appropriately and then run R like this from the Windows console:
Rpathset
Rgui
I ran into this issue running a Windows 7 machine without admin rights. I leveraged G. Grothendieck's response, with a few additional steps.
Get Rpathset.bat from https://code.google.com/p/batchfiles/
Edit the Set statements in Rpathset.bat to your paths
Run CMD and change directories to where Rpathset.bat is stored
In the command prompt, run rpathset.bat > mypath.txt
Open mypath.txt with a text editor
Click Windows Start and search for environment
Click Edit environment variables for your account
Click path and then edit
Copy and paste the entire path from mypath.txt into the Windows path (everything after the path statement)
Restart RStudio and check that devtools::find_rtools() is TRUE
This file rtools.r contains the code for find_rtools(). It looks like it is trying to find ls and gcc in your system path (and then does some more checks based on the version) and if that fails it tries to look up SOFTWARE\R-core\Rtools in the the Windows registry.
As Thomas mentioned here, "Rtools is not a package." This is what I did to install Rtools. My RStudio is running R version 3.1.3. So I downloaded Rtools31.exe from https://cran.r-project.org/bin/windows/Rtools/. I executed the exe file, selected all the default options in the Setup Wizard and installed. (I had admin privilege on the computer I was using but I am not sure if that makes any difference.) To check that it was properly installed, you can enter find_rtools() in the R prompt which should return TRUE if Rtools installed properly.
For R 3.0, you probably just need to download Rtools30.exe and follow the same steps above.
I ran into this problem trying to install Rtools33 to use Hadley Wickham's lineprof package. I got that error multiple times. I'm running Windows 7 on a laptop.
I was able to fix the problem by running the Rtools installation file as the windows Admin (i.e. right-click the Rtools33.exe and choose "Run as administrator")
I also made sure to point the path to the R source directory, which I kept in C:\Rtools\ (which contains C:\Rtools\bin\ and C:\Rtools\gcc-4.6.3\).
This solved the problem for me and I am now able to install lineprof from GitHub and make use of it.

Using StatET with Eclipse in Win64: "no session of R is active in the current workbench window"

What do I do when I get the following error message in Eclipse when trying to launch R?
"no session of R is active in the current workbench window"
I've made a tutorial for installing StatET on my Win64 system, you can find it here (mirror). Although it's no rocket science it's easy to get into issues along the way.
You need to first configure R for your system and then you also need to go into Run > Run Configurations... and add a R Console before you can run it.
You also need to be careful about the Java version that you use. I had to uninstall all my Java, then reinstall the 64-bit before it worked. I guess I could've used the 32-bit, but since I use 64-bit R I thought that it might be a better option (although I think the Eclipse environment and R don't really care about sharing bits)
for me had to select rterm, that displayed the r console/terminal. Then do run , run as -> run in R as script via source
I had the sampe problem.
go to Run > Run Configurations > RStudio
and klick on "Run"

Resources