Rstudio launch error, pointing to wrong location of R - r

When Rstudio is launched from the Ubuntu launcher, I got an error
"R script path (/usr/lib/R) is a directory rather than a file."
My R is installed in
/usr/bin/R
This is quite strange as everything was fine just few hours ago and I haven't made any change to R or Rstudio.
Question is, how to make Rstudio point to the correct location of R? I'm not able to get inside the Gui, so it has to be done on command line.
Platform :
Rstudio 1.1.442
Ubuntu 16.04
R 3.4.4
EDIT : Completely reinstalled Rstudio, gotten ride of the .rstudio-desktop folder, still the same error.
I put this line in .bashrc, and I'm able to launch it from a terminal,
export RSTUDIO_WHICH_R=/usr/bin/R

Related

How to install RGui to update R version

This may be an odd question: where do I find RGui?
I want to update my R-version from 4.1.2 to 4.2. I found this website which uses RGui. However I cannot find a RGui in my Windows Start Menu and searching the web yields this.
I believe I have to install any RGui and run the installation commands, is this correct? If so, can you recommend a software?
Rgui comes with R. There is nothing extra to install to run it. You do not need RStudio in order to run Rgui. RStudio is a front end to R that is separate from Rgui and is an alternative to Rgui . Unlike Rgui, RStudio does not come with R.
To get a desktop icon, run the R installer again and make sure you have the item checked for a Desktop Icon.
To locate Rgui.exe try this from the Windows cmd line assuming R is installed in the standard location.
cd C:\Program Files\R
dir /b /s Rgui.exe
Also if Rgui is already on your path then running this from the Windows cmd line should find it.
where Rgui.exe

Cannot start jupyter notebook after deleting anaconda

What happened:
I have had Pip and Anaconda installed on my Mac. I tried to tidy up and decided to delete Anaconda since I assumed I only needed Pip for my Python programming.
My question:
I have been using jupyter notebook for my university project. Apparently, it had been installed by me using anaconda. Now that anaconda is gone, when I try running jupyter notebook, it is still looking in the deleted anaconda directory and throws the following error in the command line
/Users/username/anaconda3/bin/jupyter: No such file or directory
Furthermore, I now get this error when installing jupyter using pip3:
WARNING: The scripts jupyter, jupyter-migrate and jupyter-troubleshoot are installed in '/Users/username/Library/Python/3.8/bin' which is not on PATH.
Unfortunately, I barely have an idea of what I am doing when installing anything using the command line. Could you help me out in fixing the issue?

Cannot open rstudio from command line though installation worked

I can't start rstudio from my linux terminal. It always shows me this message:
Unable to determine real path of R script /home/remi/anaconda3/bin/R (system error 2 (No such file or directory))
I have Kubuntu 18 and anaconda installed on it.
I had trouble with installing curl and other libraries that need curl.
Since it was maybe due to a problem of paths, I removed R and RStudio from my conda environment in order to work only on the R and RStudio installed in Kubuntu. Something must have gone wrong.
I have tried to remove and reinstall both R and RStudio but it didn't work.
Weirdly, I can launch RStudio from my application launcher and I was able to install all the libraries I needed.
I would like to be able to launch RStudio from the terminal without any problem.
Does someone know what the problem is ?
Thank you !

Cannot get IRkernel::installspec() to work, jupyter-client not visible

I am still in progress to get Jupyter-Notebook and R working together on Windows 10 machine. After solving the problem with install_github() I am now facing just another issue. I am still following the official installation guide, I am stuck at step 2:
Every time I get this error - I have tried this in R GUI and RStudio, the same:
> IRkernel::installspec()
Error in IRkernel::installspec() :
jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127.
In addition: Warning message:
In system2("jupyter", c("kernelspec", "--version"), FALSE, FALSE) :
'"jupyter"' not found
My attempts so far: It was suggested here and here, that this could be a problem with the PATH variable setting, so I have added Anaconda to the PATH enviroment. I also installed the jupyter-client via the Anaconda console. No change so far. Any ideas?
This answer is based on this by #Ryan, but since the question answered was actually about a Linux based system I put it here in a Windows question:
One way to overcome the problem - if adding PATH variables to the environment doesn't work - is the following:
If Anaconda is installed and the Jupyter-Notebook with it (should be the standard install), open up the Anaconda prompt, not the Windows command prompt or the Anaconda Navigator
Look up the executable of R (not Rgui or Rstudio), it should be somewhere like C:\Program Files\R\R-3.5.1\bin and copy the path
Paste the path into the Anaconda prompt and start R by typing R
Now execute IRkernel::installspec() once again, this time there shouldn't be an error
Now you can start an R kernel within Jupyter-Notebook
You should try to open R in the terminal, if you changed directory where R il located type:
R.exe
and then run:
IRkernel::installspec()
I was having this issue trying to run Jupyter Lab on my Ubuntu 18.04 LTS headless server running in an Azure VM.
To resolve the issued, I had to navigate to /usr/bin and open R from there. It turns out that despite my path, calling R from the terminal opened the anaconda3 version in /home/<you>/anaconda3/bin/R.
Run IRkernel::installspec() from /usr/bin/R in as sudo and it should add the kernel.
If jupyter.exe is installed under c:\python36\sripts, run
"setwd("c:/python36/scripts")" on R GUI, run "IRkernel::installspec()"
Simply create a new virtual environment for R. Either using the CLI or the anaconda Navigator (best recommended, If and if you're using Anaconda).

Run R (from pkg) in terminal on OS X

I just installed MacOS version of R from the CRAN web site. Within the R GUI application, everything works fine. However, I'm unable to run it from terminal. Trying to trigger R or Rscript in terminal yields a message indicating that neither command exists.
Also I do not see corresponded scripts in /Applications/R.app/Contents/.
How can I run R from terminal?
PS: I know brew installation will help. But I want this version of R from CRAN web site.
The R installer creates /Library/Frameworks/R.framework/ directory in addition to /Applications/R.app/.
So, you need add a correct directory to the Library dir. For my packages:
R_APP_DIR=/Library/Frameworks/R.framework/Versions/3.2/Resources/
export PATH=$R_APP_DIR:$PATH

Resources