Questions tagged [rcurl]

RCurl is an R package that provides an R-friendly wrapper for the libcurl C library.

RCurl is an R package that provides a wrapper for the libcurl C library (not the cURL command-line tool, ). RCurl greatly simplifies the process of interfacing R programs with web services and provides simple functions to perform common HTTP calls such as POST and GET. RCurl is cross-platform and installs necessary dependencies when it is added as an R package.

The core workhorse function in RCurl is curlPerform, which maps curl_easy_opt options almost verbatim. See listCurlOptions() for a list of arguments representing those options that can be passed to curlPerform (either directly or via other RCurl functions).

Users may also be interested in the package, which provides a further simplified wrapper around RCurl for common requests.

734 questions
76
votes
4 answers

"Non Zero Exit Status" R 3.0.1 'XML' and 'RCurl'

I am having a bit of trouble installing XML and RCurl on my Ubuntu machine 13.10. I performed all sudo update and upgrades today. I am trying to use rattle for R. I am unable to install 'XML' which is required for the use of rattle. This is pretty…
MCP_infiltrator
  • 3,961
  • 10
  • 45
  • 82
36
votes
1 answer

Upload a file over 2.15 GB in R

I've got a manual process where I'm uploading 5-6 GB file to a web server via curl: curl -X POST --data-binary @myfile.csv http://myserver::port/path/to/api This process works fine, but I'd love to automate it using R. The problem is, I either…
Zach
  • 29,791
  • 35
  • 142
  • 201
27
votes
9 answers

reading a json file in R: lexical error: invalid char in json text

Here is an example of the code I'm using: library(jsonlite) library(curl) #url url =…
user3083674
27
votes
4 answers

How to download a file behind a semi-broken javascript asp function with R

I am trying to fix a download automation script that I provide publicly so that anyone can easily download the world values survey with R. On this web page - http://www.worldvaluessurvey.org/WVSDocumentationWV4.jsp - the PDF link…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
26
votes
1 answer

R: download data securely using TLS/SSL

Official Statements In the past the base R download.file() was unable to work with HTTPS protocols and it was necessary to use RCurl. Since R 3.3.0: All builds have support for https: URLs in the default methods for download.file(), url() and code…
antonio
  • 10,629
  • 13
  • 68
  • 136
23
votes
1 answer

R - install_github fails

I am trying to install a package from github in R, however I am getting the following error: > install_github("jmp75/rClr", build_vignettes=TRUE) Downloading github repo jmp75/rClr@master Error in curl::curl_fetch_memory(url, handle = handle) :…
screig
  • 607
  • 1
  • 6
  • 19
22
votes
1 answer

R - How to make a click on webpage using rvest or rcurl

I want to download data from this webpage The data can be easily scraped with rvest. The code maybe like this : library(rvest) library(pipeR) url <- "http://www.tradingeconomics.com/" css <- …
yan zhuang
  • 243
  • 1
  • 2
  • 6
21
votes
2 answers

devtools::install_github() - Ignore SSL cert verification failure

I'm trying to get devtools::install_github() working behind my corporate proxy on Windows 7. So far I've had to do the following: > library(httr) > library(devtools) > set_config(use_proxy("123.123.123.123",8080)) >…
Tommy O'Dell
  • 7,019
  • 13
  • 56
  • 69
20
votes
1 answer

Changing Tor identity in R

I am using Tor in combination with R and would like to change my IP for each new request. The code I have is as follows: library(RCurl) opts <- list(proxy="127.0.0.1", proxyport=8118) for (i in 1:10) { con <-…
blaster
  • 201
  • 2
  • 3
19
votes
2 answers

Scrape password-protected website in R

I'm trying to scrape data from a password-protected website in R. Reading around, it seems that the httr and RCurl packages are the best options for scraping with password authentication (I've also looked into the XML package). The website I'm…
itpetersen
  • 1,475
  • 3
  • 13
  • 32
19
votes
2 answers

How do I use cookies with RCurl?

I am trying to write an R package that accesses some data via a REST API. The API, however, doesn't use http authentication, but rather relies on cookies to keep credentials with the session. Essentially, I'd like to replace the following two lines…
Josh Reich
  • 6,477
  • 5
  • 28
  • 26
19
votes
2 answers

automating the login to the uk data service website in R with RCurl or httr

I am in the process of writing a collection of freely-downloadable R scripts for http://asdfree.com/ to help people analyze the complex sample survey data hosted by the UK data service. In addition to providing lots of statistics tutorials for these…
Anthony Damico
  • 5,779
  • 7
  • 46
  • 77
18
votes
6 answers

reading csv files over ssl with R

Now that the whole world is clambering to use SSL all the time (a decision that makes a lot of sense) some of us who have used github and related services to store csv files have a little bit of a challenge. The read.csv() function does not support…
JD Long
  • 59,675
  • 58
  • 202
  • 294
18
votes
2 answers

Downloading large files with R/RCurl efficiently

I see that many examples for downloading binary files with RCurl are like such: library("RCurl") curl = getCurlHandle() bfile=getBinaryURL ( "http://www.example.com/bfile.zip", curl= curl, progressfunction = function(down,…
antonio
  • 10,629
  • 13
  • 68
  • 136
16
votes
5 answers

POST request using RCurl

As a way of exploring how to make a package in R for the Denver RUG, I decided that it would be a fun little project to write an R wrapper around the datasciencetoolkit API. The basic R tools come from the RCurl package as you might imagine. I am…
rtelmore
  • 1,365
  • 1
  • 8
  • 8
1
2 3
48 49