Hazem HASAN
Hazem HASAN

Reputation: 1658

plotly installation with R

i want to install plotly package in R, from github

library(devtools)
install_github("ropensci/plotly")

and i have an error message:

Downloading github repo ropensci/plotly@master
Error in function (type, msg, asError = TRUE)  : couldn't connect to host

i have searched on the internet and i found that it's a problem of proxy, i tried:

set_config(
use_proxy(url="https://github.com/ropensci/plotly", port=8080, username="***",password="***")
)

but still have the same problem, i don't know what to put in url and port values, i have two accounts on Githup and plotly

thank you for your help

Upvotes: 0

Views: 1483

Answers (2)

Sixiang.Hu
Sixiang.Hu

Reputation: 1019

It looks like you are in some special network that your network administrator restricts the access to the address (https://github.com/ropensci/plotly) though a different port (8080).

To set a proxy, please replace the target URL (https://github.com/ropensci/plotly) with the a proxy web address. Namely, change your code to:

set_config(use_proxy(url="proxy.aaa.com", port=8080)

Assuming this proxy.aaa.com is the proxy you can use, but this should not be your target address.

More information, can try ?use_proxy

Upvotes: 0

hrbrmstr
hrbrmstr

Reputation: 78792

It's only a proxy problem if your network (probably employer) uses a proxy server on their perimeter.

If it really is a proxy, problem you'll have to use a different method to set the proxy for plotly operations, since it uses curlPerform from RCurl directly. Something like this:

opts <- list(
  proxy         = "YOUR_PROXY_HTTP_URL",
  proxyusername = "YOUR_PROXY_USERNAME", 
  proxypassword = "YOUR_PROXY_PASSWORD", 
  proxyport     = YOUR_PROXY_PORT
)

options(RCurlOptions = opts)

before you do any plotly operations.

You will need to use the values provided by your employer or network provider (i.e. not GitHub or plotly) for those values.

Upvotes: 3

Related Questions