Displaying 20 results from an estimated 33 matches for "bzfile".
Did you mean:
gzfile
2004 Feb 01
1
bzfile() in R
I'm putting together a data package and am finding that I get
enormous savings in space by using bzip instead of the usual gzip
in save(). Is it safe to assume that for R versions, say >=
1.7.1, that the function bzfile() will always be available?
Thanks,
-roger
2010 Jun 22
4
seek() and gzfile() on 32-bit R2.12.0 in linux
...gz", "w") # compressed file
> cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file = zz, sep =
"\n")
> close(zz)
> blah = file("ex.gz", "r")
> seek(blah)
[1] 7.80707e+17
>
> zz <- bzfile("ex.bz2", "w") # bzip2-ed file
> cat("TITLE extra line", "2 3 5 7", "", "11 13 17", file = zz, sep =
"\n")
> close(zz)
> blah = file("ex.bz2", "r")
> seek(blah)
Error in seek.connection(...
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"
>
2006 Oct 02
0
2.3.1: interacting bugs in load() and gzfile() (PR#9271)
...closing a connection that was *not* already open.
2. gzfile() sets a class of its return value to "file", rather than
"gzfile":
> f <- gzfile("whatever.gz", "wb")
> class(f)
[1] "file" "connection"
In contrast, bzfile() exhibits correct behaviour:
> f2<-bzfile("more.bz2", "wb")
> class(f2)
[1] "bzfile" "connection"
This prevents load() from noticing that the connection passed to it is already
a gzfile, since it tests for inheritance from class "gzfile&q...
2011 Jul 30
1
read.table only reads part of file
Hi all,
I encountered a problem when trying to read in an Illumina chip
annotation file. The offending file is large, so I zipped it up and
posted it at
http://www.genetics.ucla.edu/labs/horvath/CoexpressionNetwork/tmp/ProbeInfo_Expression.txt.bz2
Executing this:
annot = read.table(bzfile("ProbeInfo_Expression.txt.bz2"),
comment.char="", sep = "\t", fill = TRUE, header = TRUE);
leads to
> dim(annot)
[1] 25952 28
i.e. 25952 rows were read, but the file is some 48000 rows long.
The file contains long text entries (up to several...
2002 Aug 06
0
pipe and binary i/o (on Linux)
...esday, August 06, 2002 3:00 AM
To: Huntsinger, Reid
Cc: r-help at stat.math.ethz.ch
Subject: Re: [R] pipe and binary i/o (on Linux)
On Mon, 5 Aug 2002 ripley at stats.ox.ac.uk wrote:
> pipe predates readBin, and no one has seen a reason to do this before you.
However, gzfile should work, and bzfile *always* opens with "rb". Here's
an example on RH7.2:
> zz <- gzfile("testbin.gz", "wb")
> writeBin(1:10, zz)
> close(zz)
> zz <- gzfile("testbin.gz", "rb")
> readBin(zz, integer(), 4)
[1] 1 2 3 4
> readBin(zz, integer(...
2002 Aug 05
1
pipe and binary i/o
...directly
to "popen" (I'm using Linux on an Intel machine). Popen doesn't know "rb"
and fails. I modified the pipe function in connection.c to pass only the
first character of the mode. This seems to work (fingers crossed). Then I
noticed gzfile has the same problem, but bzfile doesn't, and uses the same
solution as I did for pipe. Can I assume that this is a correct fix? Or were
there reasons that pipe and gzfile wouldn't allow "rb"?
Thanks,
Reid Huntsinger
-----Original Message-----
From: Thomas Lumley [mailto:tlumley at u.washington.edu]
Sent: Mon...
2016 Apr 09
1
Run script R
...-------------------------------script R:
suppressMessages (library(ggplot2))
source ("graph-style.R")
input = "graphs/figure-3-data-propagation-vs-time/car-relay-jump-distance.txt.gz2"output = "graphs/pdfs/figure-3-data-propagation-vs-time.pdf"
data <- read.table (bzfile(input, "r"), header=TRUE)data$Run = as.factor(data$Run)data$DistanceFromSource = data$NodeId * data$Distance
data = subset(data, Distance %in% c(10, 50, 90, 130, 170))data$Distance = as.factor(data$Distance)
g <- ggplot(data, aes(x=Time-2, y=DistanceFromSource, colour=Distance, linety...
2006 Nov 08
1
Reading bzip2 and tar files in R
Is there any way to read and decompress inside R tar and bzip2 files ?
Thanks
D
-----------------------------------------
Stay ahead of the information curve.
Receive EDA news and jobs on your desktop daily.
Subscribe today to the EDA CafeNews newsletter.
[ http://www10.edacafe.com/nl/newsletter_subscribe.php ]
It's informative and essential.
This message was sent to you from a machine
2017 Jul 07
2
[New Patch] Fix disk corruption when writing
...tion(fc) :
closing '/dev/full' failed: No space left on device
> fc=xzfile("/dev/full", "w"); write.csv("a", file=fc); (res=close(fc))
NULL
Warning message:
In close.connection(fc) :
closing '/dev/full' failed: No space left on device
> fc=bzfile("/dev/full", "w"); write.csv("a", file=fc); (res=close(fc))
NULL
Warning message:
In close.connection(fc) :
closing '/dev/full' failed: No space left on device
Note that if we test only status < 0 (without errno) then there are too many warnings
on seemi...
2010 Sep 16
3
funciones en R potencialmente peligrosas via web?
...', '.readRDS', '.saveRDS', '.Script', '.Tcl',
'.Tcl.args', '.Tcl.callback', '.Tk.ID', '.Tk.newwin',
'.Tk.subwin',
'.Tkroot', '.Tkwin', 'basename', 'browseURL', 'bzfile',
'capture.output', 'close', 'close.screen',
'closeAllConnection', 'data.entry',
'data.restore', 'dataentry', 'de', 'dev.control',
'dev.copy2eps',
'dev.cur', 'dev...
2017 Jul 07
1
[New Patch] Fix disk corruption when writing
...pace left on device
>> > fc=xzfile("/dev/full", "w"); write.csv("a", file=fc); (res=close(fc))
>> NULL
>> Warning message:
>> In close.connection(fc) :
>> closing '/dev/full' failed: No space left on device
>> > fc=bzfile("/dev/full", "w"); write.csv("a", file=fc); (res=close(fc))
>> NULL
>> Warning message:
>> In close.connection(fc) :
>> closing '/dev/full' failed: No space left on device
>>
>> Note that if we test only status < 0 (wit...
2017 Jul 07
0
[New Patch] Fix disk corruption when writing
...v/full' failed: No space left on device
> > fc=xzfile("/dev/full", "w"); write.csv("a", file=fc); (res=close(fc))
> NULL
> Warning message:
> In close.connection(fc) :
> closing '/dev/full' failed: No space left on device
> > fc=bzfile("/dev/full", "w"); write.csv("a", file=fc); (res=close(fc))
> NULL
> Warning message:
> In close.connection(fc) :
> closing '/dev/full' failed: No space left on device
>
> Note that if we test only status < 0 (without errno) then there a...
2008 Jul 20
4
v1.1.2 release candidate
I've finally read and answered most of the mails on this list. ?If you
haven't received an answer to your question, resend it. There are a
couple of tricky mbox issues left, but I'm not sure if I can do anything
about them unless someone can show me how to reproduce the problems.
There are quite a lot of new features in v1.1.2 actually. Most of them
are in plugins so hopefully they
2011 Apr 13
0
R 2.13.0 is released
...tract(). This
allows an external unzip program to be used, which can be useful
to access features supported by Info-ZIP's unzip version 6 which
is now becoming more widely available.
? There is a simple zip() function, as wrapper for an external zip
command.
? bzfile() connections can now read from concatenated bzip2 files
(including files written with bzfile(open = "a")) and files
created by some other compressors (such as the example of
PR#14479).
? The primitive function c() is now of type BUILTIN.
? plot(<dendrogram&...
2011 Apr 13
0
R 2.13.0 is released
...tract(). This
allows an external unzip program to be used, which can be useful
to access features supported by Info-ZIP's unzip version 6 which
is now becoming more widely available.
? There is a simple zip() function, as wrapper for an external zip
command.
? bzfile() connections can now read from concatenated bzip2 files
(including files written with bzfile(open = "a")) and files
created by some other compressors (such as the example of
PR#14479).
? The primitive function c() is now of type BUILTIN.
? plot(<dendrogram&...
2017 Jul 07
2
[New Patch] Fix disk corruption when writing
Duncan Murdoch has written at Thu, 6 Jul 2017 13:58:10 -0400
> On 06/07/2017 5:21 AM, Serguei Sokol wrote:
>> I propose the following patch against the current
>> R-devel/src/main/connection.c (cf. attached file).
>> It gives (on my linux box):
>> > fc=file("/dev/full", "w")
>> > write.csv("a", file=fc)
>> Error in
2010 Apr 22
2
R2.11.0 - rasterImage() and barplot fill-patterns
...are now interpreted more
> consistently. open = "r" is now equivalent to open = "rt" for
> all connections. The default open = "" now means "rt" for all
> connections except the compressed file connections gzfile(),
> bzfile() and xzfile() for which it means "rb".
>
> o R CMD INSTALL now uses the internal untar() in package utils:
> this ensures that all platforms can install bzip2- and
> xz-compressed tarballs. In case this causes problems (as it
> has on some Window...
2010 Apr 22
0
R 2.11.0 is released
...for connections are now interpreted more
consistently. open = "r" is now equivalent to open = "rt" for
all connections. The default open = "" now means "rt" for all
connections except the compressed file connections gzfile(),
bzfile() and xzfile() for which it means "rb".
o R CMD INSTALL now uses the internal untar() in package utils:
this ensures that all platforms can install bzip2- and
xz-compressed tarballs. In case this causes problems (as it
has on some Windows file systems when...
2010 Apr 22
0
R 2.11.0 is released
...for connections are now interpreted more
consistently. open = "r" is now equivalent to open = "rt" for
all connections. The default open = "" now means "rt" for all
connections except the compressed file connections gzfile(),
bzfile() and xzfile() for which it means "rb".
o R CMD INSTALL now uses the internal untar() in package utils:
this ensures that all platforms can install bzip2- and
xz-compressed tarballs. In case this causes problems (as it
has on some Windows file systems when...