Dieter Menne wrote:
> 
> Velappan Periasamy wrote:
>> I am not able to import zipped files from the following link.
>> How to get thw same in to R?.
>> mydata <-
>> read.csv("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)
>>
> 
> As Brian Ripley noted in 
> 
> http://markmail.org/message/7dsauipzagq5y36o
> 
> you will have to download it first and then to unzip.



Well if downloading to disk first does need to be avoided, you can use
the RCurl and Rcompression packages to do the computations in memory:

library(RCurl)
ctnt = 
getURLContent("http://nseindia.com/content/historical/EQUITIES/2010/JAN/cm15JAN2010bhav.csv.zip";)


library(Rcompression)
zz = zipArchive(ctnt)
names(zz)
txt = zz[[1]]
read.csv(textConnection(txt))

 D.

> 
> Dieter
> 
>

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to