Displaying 20 results from an estimated 2000 matches similar to: "zip.file.extract on Windows"
2002 Feb 04
1
read zipped files
I received several answer to my querry re reading zipped files,
R.Gentleman, Liaw Andy, BD Ripley,J Holtman, A.Matt, and others,
sorry
if I missed your names.
a- use pipe to run external unzip to a file and read from there
b- use gzfile() to open directly a gzipped file
c- use zip.file.extract()
solution b works like a charm, unfortunately it open gzipped files
and
not zipped files, would it be
2007 Jun 06
1
opening a file from within a zipfile that is online
Hi
Reading the help for ?unz I was wondering if I can read data into R from within
an zipfile that is on some website, like maybe:
dtaa =
read.table(unz("http://www.ats.ucla.edu/stat/examples/alsm/alsm.zip","Ch01pr19.dat"))
Thanks for letting me know if you came acros such a thing before.
Toby
2005 Aug 24
1
How to get the list of the files when you read zip file by gzfile or unz
Dear List,
Does somebody know how to get the filename lists in the ziped when
"gzfile" or "unz" command is used ?
Thanks for your help.
Shawn Lee
--
The information contained in this communication and any atta...{{dropped}}
2012 May 30
1
reading file in zip archive
Hi List
I have a series of zip archives each containing several files. One of these files is called goCats.txt and I would like to read it into R from the archive. It's a simple tab delimited text file.
pathToZip <- '/home/iain/Documents/Work/Results/bovineMacRNAData/deAnalysis/afInfection/commonNorm/twoHrs/af2hrs.zip'
z <- unz(pathToZip, 'goCats.txt', 'r')
zT
2007 Dec 19
1
unexpected behavior from gzfile and unz
I get unexpected behavior from "readLines()" and
"scan()" depending on how the file is opened with
"gzfile" or "unz". More specifically:
> file <- gzfile("file.gz")
> readLines(file,1)
[1] "a\tb\tc"
> readLines(file,1)
[1] "a\tb\tc"
> close(file)
It seems that the stream is rewound between calls to
readLines.
2024 Oct 25
1
readLines() and unz() and non-empty final line
Hi,
you could use "scan" instead, it seems to work fine also when wrapped
around "unz".
Or, alternatively, you could use "unzip" instead of "unz". It works as
expected, i.e. reads the last incomplete line and throws a warning about
this.
So it seems to me that "unz" creates a non-blocking connection, whereas
"unzip" creates a
2024 Oct 25
1
readLines() and unz() and non-empty final line
Hi again,
The unz connection is non-blocking by default. I checked do_unz which calls
R_newunz which calls init_con and the only place in any of those functions
that sets 'blocking' is init_con which sets it to FALSE:
https://github.com/wch/r-source/blob/0c26529e807a9b1dd65f7324958c17bf72e1de1a/src/main/connections.c#L713
I'll open an issue on R-bugzilla and see if they're
2003 Jul 11
2
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",
2012 Jan 31
2
how to unzip files in R
Hi,
I have downloaded a bunch of bz2 files. I wonder if R will be able to
unzip them in a batch mode or even one at a time?
I was looking at the unz function. But it didn't work well. Say I have
a bz2 file in H:/Temp/65502805_532.pair.bz2. Anyone has any
suggestion?
thanks
John
> setwd("H:\\Temp\\")
> getwd()
[1] "H:/Temp"
>
2009 Mar 19
1
zip.file.extract
Hello everyone,
Can anyone give me some hint/suggestion for unzipping a file in R? The
help file for "zip.file.extract" function seems to be difficult to
understand.
For example, the name of my zip file is "refGene.txt.gz", which is
located in "C:\Documents and Settings\Desktop\test1". I would like to
unzip this file to the same directory.
Here's
2024 Oct 24
3
readLines() and unz() and non-empty final line
But note:
> zip("hello.zip", "hello.txt")
updating: hello.txt (stored 0%)
> readChar(unz("hello.zip","hello.txt"),100)
[1] "hello"
I leave it to you and other wiser heads to figure out.
Cheers,
Bert
On Thu, Oct 24, 2024 at 8:57?AM Iris Simmons <ikwsimmo at gmail.com> wrote:
> Hi Mikko,
>
>
> I tried running a few
2024 Oct 24
2
readLines() and unz() and non-empty final line
Dear list,
I'm seeing a strange interaction with readLines() and unz() when reading
a file without an empty final line. The final line gets dropped silently:
> cat("hello", file = "hello.txt")
> zip("hello.zip", "hello.txt")
adding: hello.txt (stored 0%)
> readLines(unz("hello.zip", "hello.txt"))
character(0)
The
2009 Jul 28
2
Looking for example of usage of function unz
I would greatly appreciate some example of correct usage of function unz.
I have to download and uncompress the following web compressef file:
ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip
I tried the following command that does not work:
Targets.rec <- readLines(zz <- unz("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip"))
2003 Jul 24
0
unz( "x.zip", "y.csv" ) != pipe( "unzip -p x.zip y.csv" )
Not sure this is a bug in R.
Maybe its a bug in my understanding of unz().
The character 'b2' (hexadecimal) is in position 535 of line 1
of 'naughty.csv'. This character appears as superscript '2' and came to me
in an EXCEL file that I converted to text in a comma separated ( *.csv )
format.
The first line gets truncated by readLines after 534 characters using
unz():
2007 Mar 05
3
Rbind with data frames -- column names question
As part of my work, I am trying to append matrices onto data frames.
Naively I assumed that when rbinding a data.frame and matrix, the matrix
would be coerced and appended, keeping the names from the data frame.
Clearly, I am not fully understanding the process by which rbind works.
Example code:
> A<-data.frame(1,1,1); names(A)=letters[1:3] ; B<-matrix(0,2,3)
> rbind(A,B)
2008 Oct 09
1
Reading zipped data directly from an FTP url
Hi
Sorry, I am clearly missing something here.
I want to read this file directly:
ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.gallus_gallus.
zip
I tried using
read.table(gzfile("ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5
.txt.gallus_gallus.zip"))
But I got an error:
Error in open.connection(file, "r") : cannot open the connection
In addition:
2010 Mar 13
3
How can I access a ZIP file that's over 2Gb?
I have a zip file. It is over 2Gb in size:
-rw-r--r-- 1 sweh sweh 2383956582 Mar 13 13:44 test.zip
The standard "unzip" program barfs:
% unzip -l test.zip
Archive: test.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment
2008 Oct 30
2
Small modification of zip.file.extract in utils?
Dear list,
I needed to extract a zip-archive, and found zip.file.extract in utils.
My only problem was the use of tempdir(), since I wanted to permanently
extract the archive at a fixed location for later use. My own fix was
simple, adding an extra parameter zipdir (without default), and within
the function change
tmpd <- tempdir()
to
tmpd = ifelse(missing(zipdir),tempdir(),zipdir)
This
2010 Aug 24
1
how to convert a unix R package to windows installable zip file?
Hi,
I downloaded a package with .gz extension, which presumably works for Unix,
when I installed it directly on windows, it has the error msg:
Error in gzfile(file, "r") : cannot open the connection
In addition: Warning messages:
1: In unzip(zipname, exdir = dest) : error 1 in extracting from zip file
2: In gzfile(file, "r") :
cannot open compressed file
2009 Jul 09
2
Setting up a "secure" AMI?
Hi All,
I've just upgraded our CRM and it has an Asterisk Integration Module
that I would like to test out.
The CRM is running on one of our hosted servers in the cloud. The
Asterisk server is running in my office.
I am running Asterisk 1.4.21.2~dfsg-1ubuntu3.
Reading the page
http://www.voip-info.org/tiki-index.php?page=Asterisk%20config%20manager.conf
got me a little concerned