Question: How to reconfigure Jupyter Notebook to locate specific version of R?
1
gravatar for david.wheeler7
7 weeks ago by
david.wheeler720 wrote:

How does one make Jupyter notebook use a specific version of R?

  • I have had some issues with running DESeq2 via Jupyter Notebook from Anaconda (https://support.bioconductor.org/p/118241/)
  • We recently downloaded a separate version of R from CRAN (not via Anaconda). This version has none of the problem we experienced with the version from Anaconda. However, we can not get Jupyter Notebook to use this newer version of R. It, by default, uses the older/Anaconda problem, which results in my inability to use DESeq2.

Thank you in advance for your time!

deseq2 software error • 148 views
ADD COMMENTlink written 7 weeks ago by david.wheeler720

Can I suggest that you use

jupyter --data-dir

to find the folder where ir/kernel.json lives

In that json file there is an object that looks something like this

{"argv": ["R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"],
 "display_name":"R",
 "language":"R"
}

i speculate that if you change the first "R" to the quoted string giving the absolute path of the R you want to run, and restart your jupyter, you will have the R you want. For example

 {"argv": ["/usr/local/bin/R", "--slave", "-e", "IRkernel::main()", "--args", "{connection_file}"],
     "display_name":"R",
     "language":"R"
    }
ADD REPLYlink written 7 weeks ago by Vincent J. Carey, Jr.6.3k

I have confirmed that this strategy works. You have to find the right kernel.json and ensure that the version of R you want to use has a functioning IRkernel package installed.

ADD REPLYlink written 7 weeks ago by Vincent J. Carey, Jr.6.3k

Thanks Vincent! I found the file! To find the absolute path for R is it correct that I should not use getwd() but instead find the app then use command+i? For me this means that it is "Macintosh HD/Applications/R"

Sorry for the rookie questions

ADD REPLYlink written 7 weeks ago by david.wheeler720
Answer: C: How to reconfigure Jupyter Notebook to locate specific version of R?
1
gravatar for david.wheeler7
7 weeks ago by
david.wheeler720 wrote:

I think you figured it our Vincent! The version command via JN now works and provided the current R which we installed. I will try some packages tomorrow morning and report back.

Thanks!

ADD COMMENTlink written 7 weeks ago by david.wheeler720
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 213 users visited in the last hour