similar to: file reading problem unique to windows. Err info: Error in file(file, ifelse(append, "a", "w")). cannot open the connection

Displaying 20 results from an estimated 10000 matches similar to: "file reading problem unique to windows. Err info: Error in file(file, ifelse(append, "a", "w")). cannot open the connection"

2010 Oct 06
1
what does this err mean and how to solve it? Error in file(file, ifelse(append, "a", "w"))
Dear List I am running a loop downloading ?web pages and save the html to a temporary file (use download.file() ) ?then read (using readLines) ?it in for processing; finally write useful info from each processed page to a unique file the problem is once the loop runs up to somewhere near ?5000, it will throw out an err like below and won't go further.
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
2005 Aug 25
1
how to close connections?
Hi everybody, I am using gzipped files quite extensively and cannot figure out how I can close (or reuse) connections. Example: > for(i in 1:300) {cat(i, "\n"); a <- readLines(gzfile("file.gz"), n=1) } 1 2 ... 46 47 Error in gzfile("~/tyyq/andmebaasiq/ETU/ETU1997.tsv.gz") : all connections are in use To use just gzfile without any open/close should
2008 Nov 24
1
Help reading installed packages in Vista
Hello. After run, "installed.packages()" the following error arose: Error in gzfile(file, mode) : cannot open the connection In addition: Warning message: In gzfile(file, mode) : cannot open compressed file
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
2008 Sep 05
1
reading and parsing gzipped files
Hi all,I have large compressed text tab delimited files, I am trying to write efficient function to read them, I am using gzfile() and readLines() zz <- gzfile("exampl.txt.gz", "r") # compressed file system.time(temp1<-readLines(zz )) close(zz) which work fast, and create vector of strings. The problem is to parse the result, if I use strsplit it takes longer
2011 Jan 21
1
Reading gz compressed csv file - 'incomplete line found'
Hi all, I am trying to download, decompress and read a csv file. My code: myurl <- "ftp://ftp.ncbi.nih.gov/pub/geo/DATA/supplementary/series/GSE24729/GSE24729_MitoNuclear_suppl_male_stats.csv.gz" # myfile <- "GSE24729_MitoNuclear_suppl_male_stats.csv.gz" # download.file(myurl, destfile=myfile, mode="w") # mycon <- gzcon(gzfile(myfile,
2015 Nov 06
2
corrupt PACKAGES.gz?
Is it just me, or did a corrupt PACKAGES.gz file get installed in the bin/windows/contrib/3.2 directory of CRAN mirrors recently? gzfile() complains about it and Cygwin's gzip cannot decompress it. I tried the following repos <- "https://cran.rstudio.com" v <- "3.2" pkgs.gz <- paste(sep="/", repos, "bin/windows/contrib", v,
2007 May 30
5
Possible changes to connections
When I originally implemented connections in R 1.2.0, I followed the model in the 'Green Book' closely. There were a number of features that forced a particular implementation, and one was getConnection() that allows one to recreate a connection object from a number. I am wondering if anyone makes use of this, and if so for what? It would seem closer to the R philosophy to have
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 02
1
readLines() changes mode of connection
Hi, It seems like reading a line from a gzfile() connection changes the mode of the connection from text to binary (it also alters "can write", in case it matters). The following transcript, produced on RedHat 7.1, demonstrates this "feature" (note the evolution of file$text). Is this expected? Thanks, Vadim > file <- gzfile("foo.gz") file <-
2008 Mar 08
1
Error message while trying to update packages: Error in gzfile(file, mode) : unable to open connection
Hello, I have just installed v 2.6.2 on a new computer running Windows XP and tried to perform 'update packages' via the menu option on the R console. Any advice on the following problem is much appreciated. Bob Below are the warning and error messages received. A search of the hard drive does not reveal any file including "RtmpgMMu03/libloc" . >
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
2012 Jan 26
1
Error in ifelse(append, "a", "w") : , (list) object cannot be coerced to type 'logical'
Hello I will appreciate your help with the following. Running a script in R 2.14.1 under windows vista I get the following error message: Error in ifelse(append, "a", "w") : (list) object cannot be coerced to type 'logical' However, the very same script runs perfectly well under Ubuntu. My understanding is that this type of error is associated to
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",
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 <-
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. >
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,