[Rd] as.data.frame segfaults on large lists (PR#8141)
Full_Name: Ulrich Poetter Version: 2.1.1 OS: i686-pc-linux-gnu FC2 Submission from: (NULL) (134.147.95.187) as.data.frame() segfaults on lists with very many elements: > dfn <- rep(list(rep(0,2)),198000) > test <- as.data.frame.list(dfn) Process R segmentation fault at Sun Sep 18 17:06:02 2005 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as.data.frame segfaults on large lists (PR#8141)
[EMAIL PROTECTED] writes: > Full_Name: Ulrich Poetter > Version: 2.1.1 > OS: i686-pc-linux-gnu FC2 > Submission from: (NULL) (134.147.95.187) > > > as.data.frame() segfaults on lists with very many elements: > > > dfn <- rep(list(rep(0,2)),198000) > > test <- as.data.frame.list(dfn) > > Process R segmentation fault at Sun Sep 18 17:06:02 2005 Not for me on FC4. The process size grows to about 180M and the system thrashes badly, but the calculation runs to completion. It's not unlikely that we are ignoring a failed allocation somewhere, but there's not much hope of finding it from the available information. You could try running under gdb and see where things go wrong for you. -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] as.data.frame segfaults on large lists (PR#8141)
Peter Dalgaard writes: > [EMAIL PROTECTED] writes: > > > Full_Name: Ulrich Poetter > > Version: 2.1.1 > > OS: i686-pc-linux-gnu FC2 > > Submission from: (NULL) (134.147.95.187) > > > > > > as.data.frame() segfaults on lists with very many elements: > > > > > dfn <- rep(list(rep(0,2)),198000) > > > test <- as.data.frame.list(dfn) > > > > Process R segmentation fault at Sun Sep 18 17:06:02 2005 > > Not for me on FC4. The process size grows to about 180M and the system > thrashes badly, but the calculation runs to completion. > > It's not unlikely that we are ignoring a failed allocation somewhere, > but there's not much hope of finding it from the available > information. You could try running under gdb and see where things go > wrong for you. gdb says: dfn <- rep(list(rep(0,2)),198000) test <- as.data.frame.list(dfn) Program received signal SIGSEGV, Segmentation fault. 0x08082416 in Rf_substituteList (el=0xa1c5634, rho=0x83ea668) at coerce.c:1973 1973coerce.c: No such file or directory. in coerce.c (gdb) bt #0 0x08082416 in Rf_substituteList (el=0xa1c5634, rho=0x83ea668) at coerce.c:1973 [snip] (I don't have the source handy). I have forgotten to say that R was compiled with gcc 3.3.3. All the best, Ulrich Poetter __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Receive a significant discount on your medications (PR#8142)
Obtain a great deduction on your prescriptions Name brands, Finest quality. Big range, including challenging to find drugs No previous doctors direction needed. Secret with No waiting rooms or appointmnets required Shipped within 24 hours or less, discrete packaging Acquire in bulk and Save! Even more http://uk.geocities.com/janise_chlick/?w=021186No prescription needed. A big battle was being fought in the Philippines, and so fiercely was it contested that Rob watched its progress for hours, with rapt attention. Finally a brave rally by the Americans sent their foes to the cover of the woods, where they scattered in every direction, only to form again in a deep valley hidden by high hills If only I was there, thought Rob, I could show that captain where to find the rebels and capture them __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Updated rawConnection() patch
Here's an update of my rawConnection() implementation. In addition to providing a raw version of textConnection(), this fixes two existing issues with textConnection(): one is that the current textConnection() implementation carries around unprotected SEXP pointers, the other is a performance problem due to prolific copying of the output buffer as output is accumulated line by line. This new version uses a separate buffer for connection output, which is extended in larger chunks, so that resize operations are less frequent. And the buffer is hidden behind an active binding, so that the user can't corrupt it. My original need for this is largely addressed by Brian Ripley's recent extension of readBin/writeBin to operate on raw vectors as well as connections, in the latest development tree. But I think having a raw version of textConnection is still a bit more orthogonal and flexible, and requires very little code. -- Dave --- ./src/include/Internal.h.orig 2005-08-29 17:47:27.0 -0700 +++ ./src/include/Internal.h2005-09-18 00:32:08.196336200 -0700 @@ -525,6 +525,7 @@ SEXP do_pushbacklength(SEXP, SEXP, SEXP, SEXP); SEXP do_clearpushback(SEXP, SEXP, SEXP, SEXP); SEXP do_textconnection(SEXP, SEXP, SEXP, SEXP); +SEXP do_graboutput(SEXP, SEXP, SEXP, SEXP); SEXP do_getallconnections(SEXP, SEXP, SEXP, SEXP); SEXP do_sumconnection(SEXP, SEXP, SEXP, SEXP); SEXP do_download(SEXP, SEXP, SEXP, SEXP); --- ./src/include/Rconnections.h.orig 2005-08-03 08:50:36.0 -0700 +++ ./src/include/Rconnections.h2005-09-17 23:56:01.875475000 -0700 @@ -94,8 +94,7 @@ typedef struct outtextconn { int len; /* number of lines */ -SEXP namesymbol; -SEXP data; +SEXP namesymbol, data, venv; char *lastline; int lastlinelength; /* buffer size */ } *Routtextconn; --- ./src/library/base/man/rawconnections.Rd.orig 2005-09-18 11:37:18.004405000 -0700 +++ ./src/library/base/man/rawconnections.Rd2005-09-18 11:37:00.535655300 -0700 @@ -0,0 +1,71 @@ +\name{rawConnection} +\alias{rawConnection} +\title{Raw Connections} +\description{ + Input and output raw connections. +} +\usage{ +rawConnection(object, open = "r", local = FALSE) +} +\arguments{ + \item{object}{raw or character. A description of the connection. +For an input this is an \R raw vector object, and for an output +connection the name for the \R raw vector to receive the +output. + } + \item{open}{character. Either \code{"rb"} (or equivalently \code{""}) +for an input connection or \code{"wb"} or \code{"ab"} for an output +connection.} + \item{local}{logical. Used only for output connections. If \code{TRUE}, +output is assigned to a variable in the calling environment. Otherwise +the global environment is used.} +} +\details{ + An input raw connection is opened and the raw vector is copied + at time the connection object is created, and \code{close} + destroys the copy. + + An output raw connection is opened and creates an \R raw vector of + the given name in the user's workspace or in the calling + environment, depending on the value of the \code{local} argument. + This object will at all times hold the accumulated output to the + connection. + + Opening a raw connection with \code{mode = "ab"} will attempt to + append to an existing raw vector with the given name in the user's + workspace or the calling environment. If none is found (even if an + object exists of the right name but the wrong type) a new raw vector + wil be created, with a warning. + + You cannot \code{seek} on a raw connection, and \code{seek} will + always return zero as the position. +} + +\value{ + A binary-mode connection object of class \code{"rawConnection"} + which inherits from class \code{"connection"}. +} + +\seealso{ + \code{\link{connections}}, \code{\link{showConnections}}, + \code{\link{readBin}}, \code{\link{writeBin}}, + \code{\link{textConnection}}. +} + +\examples{ +zz <- rawConnection("foo", "wb") +writeBin(1:2, zz) +writeBin(1:8, zz, size=1) +writeBin(pi, zz, size=4) +close(zz) +foo + +zz <- rawConnection(foo) +readBin(zz, "integer", n=2) +sprintf("\%04x", readBin(zz, "integer", n=2, size=2)) +sprintf("\%08x", readBin(zz, "integer", endian="swap")) +readBin(zz, "numeric", n=1, size=4) +close(zz) +} +\keyword{file} +\keyword{connection} --- ./src/library/base/man/textconnections.Rd.orig 2005-09-03 13:55:48.274305900 -0700 +++ ./src/library/base/man/textconnections.Rd 2005-09-18 11:37:03.457530300 -0700 @@ -45,16 +45,11 @@ } \value{ - A connection object of class \code{"textConnection"} which inherits - from class \code{"connection"}. + A text-mode connection object of class \code{"textConnection"} which + inherits from class \code{"connection"}. } \note{ - As output text connections keep the character vector up to date - line-by-line, they are relatively expensive to use, and it is often - better to use an anonymous \code{\link{file
[Rd] List of languages supported
Is there a list of languges supported by R: - languages for which one can get various screen text in that language - languages into which the manuals have been translated I assume that locale support is OS-specific but that the above are not. Thanks. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] List of languages supported
Gabor Grothendieck wrote: > Is there a list of languges supported by R: > > - languages for which one can get various screen text in that language Simply look into file .../po/Linguas For R-2.2.0 alpha it has: en en_GB fr de it ja ko pt_BR ru zh_CN [EMAIL PROTECTED] > - languages into which the manuals have been translated The corresponding web page is CRAN/other-docs.html It contains links to the Japanese translations. I do not know of other translations. > I assume that locale support is OS-specific but that the above > are not. Yes. Uwe Ligges > Thanks. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel