rcurl

R - install_github fails

荒凉一梦 提交于 2019-11-27 18:11:44
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) : Peer certificate cannot be authenticated with given CA certificates I have set the RCurl options as such: options(RCurlOptions = c(getOption("RCurlOptions"), ssl.verifypeer = FALSE, ssl.verifyhost = FALSE ) ) After checking the setting: getOption("RCurlOptions") we see.... $cainfo [1] "C:/_CODE/R/Library/RCurl/etc/ca-bundle.crt" $ssl.verifypeer [1]

“Non Zero Exit Status” R 3.0.1 'XML' and 'RCurl'

寵の児 提交于 2019-11-27 17:22:50
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 much the same question that was asked right here just a year later and a different OS. Here are the error messages that I am getting back: > install.packages("RCurl") Installing package into ‘/home/steven/R/x86_64-pc-linux-gnu-library/3.0’ (as ‘lib’ is unspecified) trying URL 'http://cran.rstudio.com/src/contrib/RCurl_1.95-4.1.tar.gz' Content type

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

自闭症网瘾萝莉.ら 提交于 2019-11-27 11:57:51
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 <- "#ctl00_ContentPlaceHolder1_defaultUC1_CurrencyMatrixAllCountries1_GridView1" data <- url %>>% html() %>>% html_nodes(css) %>>% html_table() But there is a problem for webpages like this. There is a + button to show the data of all the countries, but the default is just data of 50 countries. So if I use the code, I can just scrape data of 50 countries. The + button is made in javascript , so I want to

extract data from raw html in R

随声附和 提交于 2019-11-27 09:47:51
I am trying to extract the values of all the values in all tabs from this page. http://www.imd.gov.in/section/hydro/dynamic/rfmaps/weekrain.htm I first tried downloading as excel. But that was not possible. I am just able to download it as text file. If I try reading directly from webpage I get the raw html page. I am stuck as how to extract these values. Please find the code which I tried till now. library(RCurl) require(XML) url = "http://www.imd.gov.in/section/hydro/dynamic/rfmaps/weekrain.htm" download.file(url = url, destfile = "E:\\indiaprecip") Just use function "htmlTreeParse" from XML

POST request using RCurl

安稳与你 提交于 2019-11-27 08:05:15
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 stuck on a seemingly simple problem and I'm hoping that somebody in this forum might be able to point me in the right direction. The basic problem is that I can't seem to use postForm() to pass an un-keyed string as part of the data option in curl, i.e. curl -d "string" "address_to_api". For example, from the command line I might do $ curl -d "Tim O

How to use R to download a zipped file from a SSL page that requires cookies

戏子无情 提交于 2019-11-27 07:55:17
I am trying to download a file from an https page that requires an "I Agree" button be pushed and then stores a cookie. My apologies if this answer is obvious somewhere.. When I open up the web page directly in Chrome and click "I Agree" - the file starts to download automatically. http://www.icpsr.umich.edu/cgi-bin/bob/zipcart2?path=SAMHDA&study=32722&bundle=delimited&ds=1&dups=yes I tried to replicate this example , but I don't think that hangseng website actually stores the cookie/authentication, so I don't know if that example should be all I need. Beyond that, I believe the SSL

Download .RData and .csv files from FTP using RCurl (or any other method)

…衆ロ難τιáo~ 提交于 2019-11-27 07:45:30
问题 I've uploaded a .RData file (created using save() ) to an ftp server, and I'm trying to use getURL() to download that same file. For all the examples and posts I've read, I can't seem to get this to work. The .RData file was saved using: save(results, file=RDataFilePath, compress="xz") #save object "results" w/ compression #RDataFilePath is the location of the results.RData file on my harddrive These data were uploaded using: uploadURL <-"ftp://name:password@host/folder/results.RData" #name

How do I use cookies with RCurl?

六眼飞鱼酱① 提交于 2019-11-27 06:50:34
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 from a bash script with two R functions: One to perform the login, and store the session cookie, and the second to GET the data. curl -X POST -c cookies.txt -d"username=xxx&password=yyy" http://api.my.url/login curl -b cookies.txt http://api.my.url/data I'm clearly not understanding how RCurl works with curl options. My script as it stands has:

Rcurl: url.exists returns false when url does exists

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-27 06:48:59
问题 Trying to download information from a specific web page, and although it opens fine in any browser, RCurl says it does not exists: url.exists("http://www.transfermarkt.es/liga-mx-apertura/startseite/wettbewerb/MEXA") [1] FALSE Same results when using ".de". url.exists("http://www.transfermarkt.de/liga-mx-clausura/startseite/wettbewerb/MEX1") [1] FALSE It also returns an error when using other functions of RCurl > htmlParse("http://www.transfermarkt.es/liga-mx-apertura/startseite/wettbewerb

R - install_github fails

亡梦爱人 提交于 2019-11-27 04:15:51
问题 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) : Peer certificate cannot be authenticated with given CA certificates I have set the RCurl options as such: options(RCurlOptions = c(getOption("RCurlOptions"), ssl.verifypeer = FALSE, ssl.verifyhost = FALSE ) ) After checking the setting: getOption(