access plotly behind proxy

plotly, proxy, r

Solution

`pub$makecall` in plotly.R overwrites your global RCurlOptions. I've submitted a pull request to fix this.

Problem

I'm trying to make an interactive version of my ggplot2 using the plotly package. It works fine when I do it from a personal computer. Unfortunately, I'm at work, on a windows machine behind a proxy, and it fails to connect to the plotly server. Browsing the code source, I think the issue might be with the `postFrom` function from `RCurl`. I tried adding the proxy to `options(RCurlOptions = list(proxy="http://proxyurl:8080"))`, but that doesn't seem to improve things. Is there a known workaround? ``` library(httr) set_config(use_proxy(url="http://proxy.xxx.fr",port=8080,username="",password="")) options('RCurlOptions'= c(options('RCurlOptions'), list(proxy = 'http://proxy.xxxx.fr:8080'))) library(plotly) set_credentials_file(username="baptiste", api_key="xxxx") require(plotly) p2 <- qplot(1,1) py <- plotly(username="baptiste") out <- py$ggplotly(p2) # Error in function (type, msg, asError = TRUE) : couldn't connect to host ```

Original source