[R] Download and Unzip a file

himanshuy himanshu.pro at gmail.com
Wed Dec 14 14:19:49 CET 2011


Hi 

I am trying to download and unzip a zip file from the following location.

http://www.nseindia.com/content/historical/DERIVATIVES/2011/DEC/fo08DEC2011bhav.csv.zip

I initially there was issue with useragent so i ran the following code

options(HTTPUserAgent="Firefox/8.0.1")
u =
"http://www.nseindia.com/content/historical/DERIVATIVES/2011/DEC/fo08DEC2011bhav.csv.zip"
o = getURLContent(u, verbose = TRUE, useragent = getOption("HTTPUserAgent"))

now I want to unzip and save this file. I was initially working on matlab
and have recently moved to R.
any help would be much appreciated.

Thanks
Himanshu Y


--
View this message in context: http://r.789695.n4.nabble.com/Download-and-Unzip-a-file-tp4194895p4194895.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list