bensw
bensw

Reputation: 3028

Error in if (download_method_secure()) from installing native R kernel for Jupyter

I tried to install R Kernel to my Jupyter notebook on Windows from

devtools::install_github('IRkernel/IRkernel')

but I ran into this error

Error in if (download_method_secure()) { :
missing value where TRUE/FALSE needed

Any suggestions on how to fix it will be appreciated.

Upvotes: 4

Views: 268

Answers (2)

Patrick Williams
Patrick Williams

Reputation: 704

I had this issue when dealing with conda and devtools. In order to figure it out I looked at the download_method function in devtools, which is throwing the error. The solution for me was to set the global options in R for download.file.method. It seems the issue is really with Devtools trying unsuccessfully to download from a secure site.

On windows, this line fixed the problem: options(download.file.method = "wininet")

For Mac/Linux, the line would be options(download.file.method = "libcurl")

I found these lines on this page. There are some other options as well, for older versions of R. https://support.rstudio.com/hc/en-us/articles/206827897-Secure-Package-Downloads-for-R

Upvotes: 0

Curt F.
Curt F.

Reputation: 4824

This issue came up for me when I was relying on the default r-essentials version of devtools instead of the newest version. After I did a conda install -f -c r r-devtools and got the newest version, the error went away. YMMV of course.

Upvotes: 1

Related Questions