[R] unz()
Marsland, John
John.Marsland at CommerzbankIB.com
Fri Jul 11 17:18:52 CEST 2003
I've solve my own problem! apologies.
For the record:
the "filename" argument should include the full path of the file within the
directory structure of the zip file.
but there seeks to be an issue with readLines:
> readLines(z,2)
Error in readLines(z, 2) : seek not enabled for this connection
readLines(z) works fine for the whole file, but unfortunately you cannot use
things like read.table etc.
> -----Original Message-----
> From: Marsland, John [mailto:John.Marsland at commerzbankib.com]
> Sent: 11 July 2003 11:44
> To:
> Subject: [R] unz()
>
>
>
> I am having problems getting the unz() function to work as a
> connection to
> start reading a file...
>
> z <- unz("c:/temp/stoxx.zip", "close_tmi_components.txt", "r")
> readLines(z,2)
>
> yields the following problems:
>
> > z <- unz("c:/temp/stoxx.zip", "close_tmi_components.txt", "r")
> Error in unz("c:/temp/stoxx.zip", "close_tmi_components.txt", "r") :
> unable to open connection
> In addition: Warning message:
> cannot locate file `close_tmi_components.txt' in zip file
> `c:/temp/stoxx.zip'
> > readLines(z,2)
> Error in readLines(z, 2) : cannot open the connection
> In addition: Warning message:
> cannot locate file `close_tmi_components.txt' in zip file
> `c:/temp/stoxx.zip'
>
> can anybody offer any advice?
>
> Regards,
>
> John Marsland
>
>
> **************************************************************
> ********
> This is a commercial communication from Commerzbank AG.\ \
> T...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
**********************************************************************
This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}}
More information about the R-help
mailing list