Arsenio Staer
2010-Dec-03 01:53 UTC
[R] Downloading a .csv through a .jsp url with variable parameters - R code or package?
Dear R experts, I'm trying to download a .csv file with daily data on the companies through a javascript url ending in .jsp of the following form: http://....... .com/.../.../filename.jsp?y=2004&m=3&d=9 where y = year, m = month and d=day. Accessing the link gives you the .csv for that date. I want to download the whole time series day by day say from y = 2000 to 2010 into an R dataset. Any idea how to do that through R code? Thanks a lot in advance! Arsenio -- View this message in context: http://r.789695.n4.nabble.com/Downloading-a-csv-through-a-jsp-url-with-variable-parameters-R-code-or-package-tp3070541p3070541.html Sent from the R help mailing list archive at Nabble.com.
Arsenio Staer
2010-Dec-07 01:18 UTC
[R] Downloading a .csv through a .jsp url with variable parameters - R code or package?
So i realized putting this raw.untr <- as.data.frame(read.csv(file='.......jsp?y=2008&m=09&d=30', header = TRUE, as.is = TRUE)) reads the file prefectly, so i was wondering how can i create a set of dataframes each with observations for one day (say for 3 years with 250 days of data each year = 750 datasets) ? And in each loop of a cycle the text string in the url would change to reflect the new date, say from y=2008&m=09&d=30 to y=2008&m=09&d=31? Any help would be great, i somewhat expected more of a reaction given how vibrant R community is, Arsenio -- View this message in context: http://r.789695.n4.nabble.com/Downloading-a-csv-through-a-jsp-url-with-variable-parameters-R-code-or-package-tp3070541p3075644.html Sent from the R help mailing list archive at Nabble.com.
Arsenio Staer
2010-Dec-08 01:38 UTC
[R] Downloading a .csv through a .jsp url with variable parameters - R code or package?
Jim, Thanks a lot! works perfectly! now i just use a for loop and rbind to create one dataset with all daily observations. Arsenio -- View this message in context: http://r.789695.n4.nabble.com/Downloading-a-csv-through-a-jsp-url-with-variable-parameters-R-code-or-package-tp3070541p3077565.html Sent from the R help mailing list archive at Nabble.com.