similar to: how to close connections?

Displaying 20 results from an estimated 1000 matches similar to: "how to close connections?"

2007 Oct 17
1
R CMD build and et_EE.UTF-8 locale -> invalid files (PR#10351)
Full_Name: Ott Toomet Version: 2.6.0, 2.5.x OS: debian etch, lenny Submission from: (NULL) (80.235.63.243) When building a package with 'R CMD build name_of_directory" using "et_EE.UTF-8" locale, I get the following: siim at tancredi:~/tyyq/econ/micEcon$ R CMD build trunk * checking for file 'trunk/DESCRIPTION' ... OK * preparing 'trunk': * checking
2003 Feb 21
1
question about XML (package)
Hi, I have a problem with spacing in XML files when reading them with xmlTreeParse. I don't know the exact specification of xml but according what I have red before it should work. consider a tiny test.xml file: <?xml version="1.0"?> <fields> <v1>1 </v1> <v2> 2 </v2> <v3> 3</v3> </fields> i.e. I have three fields v1, v2 and
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
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.
2010 Nov 25
1
file reading problem unique to windows. Err info: Error in file(file, ifelse(append, "a", "w")). cannot open the connection
Dear List I asked this question before, got some tips but can't get it solved. it is clear now that this problem only occurs when run on windows (I tested it on windows XP) nothing wrong at all when run on unix. unfortunately, sometimes I have to run it on windows, I appreciate any suggestion on how to circumvent this problem when run on windows. below is the problem description I submitted
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",
2009 Jul 16
1
Too many open files
Hello, I'm having a problem in R. I'm getting an error message that reads, "Too many open files". I'm opening files and closing them (and unlinking them), but when I go through that process 509 times, the program halts and I get this error message: "cannot open the connection" with warning messages: "Too many open files". I've been working on
2005 Jan 25
0
COURSE: Statistical practice in Epidemiology with R
Course in STATISTICAL PRACTICE IN EPIDEMIOLOGY USING R ==================================================== Tartu, Estonia, 26 - 31 May 2005 The course is aimed at epidemiologists and statisticians who wish to use R for statistical modelling and analysis of epidemiological data. The course requires basic knowledge of epidemiological concepts and study types. These will only be briefly reviewed,
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. >
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,
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
2009 Oct 27
2
Why I get this error? Error in close.connection(f) : invalid connection
I don't understand why I can not close 'f'. This may be very simple, but I don't see why. Could somebody let me know? $ cat gzfile.csv "","V1","V2","V3","V4","V5" "1",1,5,9,13,17 "2",2,6,10,14,18 "3",3,7,11,15,19 "4",4,8,12,16,20 $ Rscript gzfile.R > f =
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
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 <-
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,
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.
2005 Dec 09
1
local source packages install from within R session - cross-platform
I realize that others have struggled with this issue...i.e. http://tolstoy.newcastle.edu.au/~rking/R/help/05/01/9826.html i am on os.x 10.4 w/ R2.2, and am (perhaps foolishly) also on this quest... i would like to be able to install downloaded source (tar.gz'd) files from within an R session, and have it work in a X-platform way..i am often not connected to the internet and have libraries
2006 Nov 14
2
gzfile with multiple entries in the archive
If I open a tgz archive with gzfile and then parse it using readLines I miss the initial line of each member of the archive - and also the name of the file although the archive otherwise complete (but useless!). Is there any way within R to extract both the list of files in a tgz archive and to extract any one of these files? Clearly I can use zcat and tar on Linux, but I need this to work
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
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 <-