rcurl

How do I run a ldap query using R?

…衆ロ難τιáo~ 提交于 2019-12-20 15:31:16
问题 I want to make a query against a LDAP directory of how employees are distributed in departments and groups... Something like: " Give me the department name of all the members of a group " and then use R to make a frequency analysis, but I can not find any examples on how to connect and run a LDAP query using R. RCurl seems to have some kind of support ( http://cran.r-project.org/web/packages/RCurl/index.html ): Additionally, the underlying implementation is robust and extensive, supporting

How do I run a ldap query using R?

自闭症网瘾萝莉.ら 提交于 2019-12-20 15:30:02
问题 I want to make a query against a LDAP directory of how employees are distributed in departments and groups... Something like: " Give me the department name of all the members of a group " and then use R to make a frequency analysis, but I can not find any examples on how to connect and run a LDAP query using R. RCurl seems to have some kind of support ( http://cran.r-project.org/web/packages/RCurl/index.html ): Additionally, the underlying implementation is robust and extensive, supporting

Changing Tor identity in R

风格不统一 提交于 2019-12-20 09:35:57
问题 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 <- socketConnection(host="127.0.0.1",port=9051) # DOES NOT WORK writeLines("signal newnym", con=con) # DOES NOT WORK ip <- getURL("http://ifconfig.me/ip", .opts = opts) print(ip) Sys.sleep(1) } I am able to connect via Tor, however the two lines marked as 'DOES NOT WORK' don't seem to get

Get site content over SSL with httr in R

非 Y 不嫁゛ 提交于 2019-12-20 04:36:46
问题 I'm trying to fetch a JSON array from my server using the HTTP POST method in R. I've tried using both the POST function from httr and the getURL function from RCurl but both return errors. cafile <- system.file("CurlSSL", "cacert.pem", package = "RCurl") url <- "https://example.com/query/getData.php" POST(url,body=NULL) POST(url,body=NULL,config(cainfo=cafile)) getURL(url) getURL(url,cainfo=cafile) The error given by the POST function is (for both calls): Error in curl::curl_fetch_memory(url

How to capture RCurl verbose output

五迷三道 提交于 2019-12-19 06:57:26
问题 I have the following request library(RCurl) res=getURL("http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&q=RCurl&btnG=Search", .opts=list(verbose = TRUE) ) and would like to capture the verbose output of the call (i.e., what is printed in red in the R console). I thought that the output lines are messages and are therefore printed to stderr() . The following works for messages sink(textConnection("test","w"),type="message") message("test message") sink(stderr(),type="message") test #[1]

Plotting large number of time series using ggplot. Is it possible to speed up?

自闭症网瘾萝莉.ら 提交于 2019-12-19 06:14:07
问题 I am working with thousands of meteorological time series data (Sample data can be downloaded from here) https://dl.dropboxusercontent.com/s/bxioonfzqa4np6y/timeSeries.txt Plotting these data using ggplot2 on my Linux Mint PC (64bit, 8GB RAM, Dual-core 2.6 GHz) took a lot of time. I'm wondering if there is a way to speed it up or a better way to plot these data? Thank you very much in advance for any suggestion! This is the code I'm using for now ##############################################

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

喜你入骨 提交于 2019-12-18 11:07:11
问题 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 data sets, I also want to automate the download and importation of this survey data. In order to do that, I need to figure out how to programmatically log into this UK data service website. I have tried lots of different configurations of RCurl

How to isolate a single element from a scraped web page in R

☆樱花仙子☆ 提交于 2019-12-18 10:56:10
问题 I want to use R to scrape this page: (http://www.fifa.com/worldcup/archive/germany2006/results/matches/match=97410001/report.html ) and others, to get the goal scorers and times. So far, this is what I've got: require(RCurl) require(XML) theURL <-"http://www.fifa.com/worldcup/archive/germany2006/results/matches/match=97410001/report.html" webpage <- getURL(theURL, header=FALSE, verbose=TRUE) webpagecont <- readLines(tc <- textConnection(webpage)); close(tc) pagetree <- htmlTreeParse

Use RCurl to bypass “disclaimer page” then do the web scrapping

限于喜欢 提交于 2019-12-18 09:39:20
问题 I have a link like this one that I would like to extract data from it using RCurl , there is a disclaimer page before that and I need to click it in my browser before I can assess the data. Previously I use the script below, which is from here, to "bypass" disclaimer page and access the data using RCurl : pagesource <- getURL(url,.opts=curlOptions(followlocation=TRUE,cookiefile="nosuchfile")) doc <- htmlParse(pagesource) It works before, but in recent few days it no long works. Actually I don

TLS v1.1 / TLS v1.2 support in RCurl

核能气质少年 提交于 2019-12-18 07:24:13
问题 ETA: Per https://github.com/hiratake55/RForcecom/issues/42, it looks like the author of the rforcecom package has updated rforcecom to use httr instead of RCurl (as of today, to be uploaded to CRAN tomorrow, 7/1/16), so my particular issue will be solved at that point. However, the general case (implementing TLS 1.1 / 1.2 in RCurl) may still be worth pursuing for other packages. Or everyone may just switch to the more recent curl package instead of RCurl. Background: I've been using the