[R] Downloading tab separated data from internet

HC hcatbr at yahoo.co.in
Sat Dec 3 13:06:38 CET 2011

Thanks for your reply.

I tried to use the  postForm function of RCurl as below but do not have much
clue as to how to go further with what it does. 

mypage1 = readLines(myurl)

# Getting the start and end dates
mypattern = '<td align="center">([^<]*)</td>'
datalines = grep(mypattern, mypage1[124], value=TRUE)

getexpr = function(s,g)substring(s,g,g+attr(g,'match.length')-1)
gg = gregexpr(mypattern, datalines)
matches = mapply(getexpr,datalines,gg)
result = gsub(mypattern,'\\1',matches)

result = postForm(myurl,fromdate=mydates[1], todate=mydates[2],rtype="Save
to File", submit1="Retrieve Data")

I tried to read the RCurl's documentation but do not know what functions I
should be using. Are there any  examples available that could be helpful.
Could you point me to those please.

Thanks for the help.

View this message in context: http://r.789695.n4.nabble.com/Downloading-tab-separated-data-from-internet-tp4152318p4153063.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list