similar to: error when calling seek() twice on a gzfile connection

Displaying 20 results from an estimated 5000 matches similar to: "error when calling seek() twice on a gzfile connection"

2013 May 08
1
getting corrupted data when using readBin() after seek() on a gzfile connection
Hi, I'm running into more issues when reading data from a gzfile connection. If I read the data sequentially with successive calls to readBin(), the data I get looks ok. But if I call seek() between the successive calls to readBin(), I get corrupted data. Here is a (hopefully) reproducible example. See my sessionInfo() at the end (I'm not on Windows, where, according to the man page,
2010 Jun 22
4
seek() and gzfile() on 32-bit R2.12.0 in linux
I have installed both 32-bit and 64-bit versions of R2.12.0 (2010-06-15 r52300) on my Ubuntu 10.04 64-bit system. I observe the following behavior when running the examples from base::connections. There appears to be a problem with seek() on a .gz file when using a 32-bit installation of R2.12.0, but the problem doesn't appear in the 64-bit installation. I realize that seek() has been
2013 May 01
1
Windows, format.POSIXct and character encodings
Hi all, In what encoding does format.POSIXct return its output? It doesn't seem to be utf-8: Sys.setlocale("LC_ALL", "Japanese_Japan.932") times <- c("1970-01-01 01:00:00 UTC", "1970-02-02 22:00:00 UTC") ampm <- format(as.POSIXct(times), format = "%p") x <- gsub(">", "*", paste(ampm, collapse =
2006 Oct 02
0
2.3.1: interacting bugs in load() and gzfile() (PR#9271)
Hello, If repeated calls are made to save() using the same pre-opened gzfile connection to a file, and then the connection is closed, the objects saved by the second and subsequent calls are not correctly restored by repeated calls to load() with a new gzfile connection to the same file. What follows are a session exposing the bugs, analysis (see ANALYSIS), patches (see PATCHES), and a session
2003 Nov 28
1
compile problem with gzfile
I just finished compiling today's r-patched (R 1.8.1 patched) on my old Sparc 20 using gcc 3.3 along with Sun's f77. As it was compiling, I noticed an error regarding gzfile. The compile process left the methods directory and continued on. Obviously, there was a problem, but I don't have the original error message from the compiler. After installing R, I get the following error
2018 May 10
0
readLines() behaves differently for gzfile connection
Would it be possible to get that file or a representative subset of it somewhere so that I can reproduce this? Thanks, Michael On Thu, May 10, 2018 at 3:31 PM, Ben Heavner <bheavner at gmail.com> wrote: > When I read a .gz file with readLines() in 3.4.3, it returns text (and a > warning). In 3.5.0, it gives a warning, but no text. Is this expected > behavior or a bug? > >
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.
2018 May 10
1
readLines() behaves differently for gzfile connection
You bet - it's available on github at https://github.com/UW-GAC/wgsaparsr/blob/master/tests/testthat/1k_annotation.gz -Ben On Thu, May 10, 2018 at 4:17 PM, Michael Lawrence <lawrence.michael at gene.com > wrote: > Would it be possible to get that file or a representative subset of it > somewhere so that I can reproduce this? > > Thanks, > Michael > > On Thu, May
2018 May 10
2
readLines() behaves differently for gzfile connection
When I read a .gz file with readLines() in 3.4.3, it returns text (and a warning). In 3.5.0, it gives a warning, but no text. Is this expected behavior or a bug? 3.4.3: > source_file = "1k_annotation.gz" > readfile_con <- gzfile(source_file, "r") > readLines(readfile_con, n = 5) [1] "#chr\tpos\tref\talt\t <truncated output here> Warning message: In
2002 Dec 05
1
writing to gzfile: segmentation fault (PR#2347)
Full_Name: Vadim Ogranovich Version: Version 1.6.0 (2002-10-01) OS: Red Hat 7.1 Submission from: (NULL) (209.99.241.1) The following sequence of commands crashes my R session. The first weirdness happens after the second command that appears not to change the "foo.gz" file, no error generated. > con <- gzfile("foo.gz", open="w"); cat("goo\n",
2016 Nov 14
0
Read.dcf with no newline ending: gzfile drops last line
I don't know if this is a bug per se, but an undesired behavior in read.dcf. read.dcf takes a file argument and passes it to gzfile if it's a character: if (is.character(file)) { file <- gzfile(file) on.exit(close(file)) } This gzfile connection is passed to readLines (line #39): lines <- readLines(file) If no newline is at the end of the file, readLines
2020 Jun 29
0
A warning in gzcon but not in gzfile
Hi all, I used `gzfile` and `gzcon` to read a compressed file but I found that `gzcon` gave me a different result than `gzfile`. It seems like the `gzcon` does not handle the data correctly. I have posted an example below. In the example, a portion of a compressed file is downloaded from Google Cloud as a raw vector, and the data is saved into a temp file. If I use ` gzfile` to read the file, it
2007 Jul 03
1
bug in closing gzfile-opened connections?
Hi, I am making multiple calls to gzfile() via read.table(), e.g. > x <- read.table( gzfile( "xxx.gz" ) ) After i do this many times (I haven't counted, but probably between 50 and 100 times) I get the error message: Error in open.connection(file, "r") : unable to open connection In addition: Warning message: cannot open compressed file 'xxx.gz' however, I
2011 Sep 23
2
Issue with seek() on gzipped connections in R-devel
Dear all, In R-devel (2011-09-23 r57050), I'm running into a serious problem with seek()ing on connections opened with gzfile(). A warning is generated and the file position does not seek to the requested location. It doesn't seem to occur all the time - I tried to create a small example file to illustrate it, but the problem didn't occur. However, it can be seen with a file I use for
2011 Oct 16
1
Error in gzfile(file, mode) when checking a package with rcmd check
Hi, For the first time I have a strange behaviour when checking a package before 'packaging' the code. Looks like a file cannot be read. rcmd check pgirmess * using log directory 'U:/Documents and Settings/pgiraudo/Mes documents/R/pgir_arch/pgirmess_arch/On work/pgirmess.Rcheck' * using R version 2.13.2 (2011-09-30) * using platform: i386-pc-mingw32 (32-bit) * using session
2011 Oct 15
2
gctorture() and gzfile() doesn't get along.
Found the simpliest way of seeing I bug I encountered doing "R CMD check --use-gct": Just launch R (with --vanilla), and do this: > ?gctorture # this work > gctorture() > ?gctorture Error in gzfile(file, "rb") : can only weakly reference/finalize reference objects # this does not It seems that when gctorture() is on gzfile() doesn't work.
2008 Apr 20
1
How to read last (incomplete) line from gzfile()?
Hi, I have some text files that do not have trailing \n on the last (incomplete) line; how do I read in the last line? e.g. here is a test case: [linux + R version 2.6.1 (2007-11-26) ] z <- gzfile("short.gz", open="w") cat("7\n5\n3", file=z) close(z) z <- gzfile('short.gz') readLines(z) [1] "7" "5" readLines would indicate that
2004 Mar 15
1
gzfile & read.table on Win32
Hello ... Are there any known problems or even gotchas to look out for when using a gzfile connection in read.csv/read.table in Windows? In the package PROcess, available at www.bioconductor.org/repository/devel/package/html/PROcess.html there are two files in the PROcess/inst/Test directory which are of the extension *.csv.gz. With both files, if I open up a gzfile connection, say: vv <-
2001 Dec 11
1
Using lib Rstreams and gzfile()
Hi all, in the last time I've intensively used Rstreams to read and write from binary files. Now I'm wondering if it is possible to use Rsteams functions with gzipped files. But I haven't found the trick: > p1c.gzip <- gzfile("daten/p1c_all.mea.gz", open="rb") > readBin(p1c.gzip, integer(), n=64,size=2) [1] 84 1 400 1 749 0 0 0
2008 Mar 07
2
Problems installing packages using the inbuilt facility: "Error i n gzfile(file, "r") : unable to open connection"
Hi I have been trawling the web, FAQs, and R manuals for help on the following issue, but have failed and was wondering if anyone has a solution to the following problem: After having installed R 2.6.2 for Windows (binary), I tried to install various packages. Every time I try loading a package (any package) via the built-in menu, I run into the following error message. >