[Rd] SVN-REVSION altered when building R-devel out of tree from last snapshot

2005-12-19 Thread Herve Pages
Hi, Today I downloaded and compiled the last R-devel snapshot. The SVN-REVISION in the tarball contains the following: Revision: 36792 Last Changed Date: 2005-12-18 But after compiling on Unix (I compiled out of tree), I ended up with an SVN-REVSION file containing: Revision: unknown L

Re: [Rd] SVN-REVSION altered when building R-devel out of tree from last snapshot

2005-12-21 Thread Herve Pages
Martin Maechler wrote: >Herve> Today I downloaded and compiled the last R-devel snapshot. >Herve> The SVN-REVISION in the tarball contains the following: > >Herve> Revision: 36792 >Herve> Last Changed Date: 2005-12-18 > >Herve> But after compiling on Unix (I compiled out of tre

[Rd] Build error on Mac OS X

2005-12-21 Thread Herve Pages
Hi, The following commands: > tar zxvf R-devel_2005-12-14.tar.gz > mv R-devel R-2.3 > cd R-2.3 > ./configure --with-blas='-framework vecLib' --with-lapack > make give me the following error on my Mac OS X system: ... g77 -fno-common -g -O2 -c xxxpr.f -o xxxpr.o make[3]: *** No rule to m

Re: [Rd] Build error on Mac OS X

2005-12-22 Thread Herve Pages
Simon Urbanek wrote: > On Dec 21, 2005, at 6:12 PM, Herve Pages wrote: > >> I don't get that problem with R-devel daily snapshots from before >> 2005-12-14 >> and I get it with (almost) all snaphots between 2005-12-14 and today. > > > Strange - I have o

Re: [Rd] Build error on Mac OS X

2005-12-22 Thread Herve Pages
Simon Urbanek wrote: On Dec 21, 2005, at 6:12 PM, Herve Pages wrote: I don't get that problem with R-devel daily snapshots from before 2005-12-14 and I get it with (almost) all snaphots between 2005-12-14 and today. Strange - I have only failure on 2005/12/17 - all others built

Re: [Rd] Build error on Mac OS X

2005-12-23 Thread Herve Pages
Prof Brian Ripley wrote: > The updating of gettext support is currently in mid-progress (and > specifically what is required for MacOS X). It looks as if your > system has another version of gettext installed: please configure R > not to use such a version for now (see configure --help for how

[Rd] Pb with agrep()

2006-01-04 Thread Herve Pages
Happy new year everybody, I'm getting the following while trying to use the agrep() function: > pattern <- "XXX" > subject <- c("oo", "oooXooo", "oooXXooo", "oooXXXooo") > max <- list(ins=0, del=0, sub=0) # I want exact matches only > agrep(pattern, subject, max=max) [1] 4 OK > max$su

Re: [Rd] Pb with agrep()

2006-01-05 Thread Herve Pages
Martin Maechler wrote: >If you specify max$all as "100%", i.e, as 0. ('< 1' !) everything works >as you expect it: > >agrep(pattern, subject, max = list(ins=0, del=0, sub= 2, all = 0.)) >## --> 2 3 4 > > OK I got it! Thanks for the explanation. Cheers, Hervé -- -

[Rd] 'cannot create directory' bug fixed

2006-01-06 Thread Herve Pages
Hi everybody, I'd like to report that the 'cannot create directory' bug that we used to have with 'R CMD build' on Windows (and sometimes on Linux too) seems to have disappeared. It's really nice because, thanks to this fix, for the first time we have a reliable automated build system for the

Re: [Rd] Multiplication (PR#8466)

2006-01-06 Thread Herve Pages
Thomas Lumley wrote: >On Fri, 6 Jan 2006, [EMAIL PROTECTED] wrote: > > > >>hi - in version 2.1 the command >> >> >> >>>-2^2 >>> >>> >>gives >> >>-4 >> >>as the answer. (-2)^2 is evaluated correctly. >> >> > >So is -2^2. The precedence of ^ is higher than that of unary minus. It

[Rd] Rd files with unknown sections

2006-02-01 Thread Herve Pages
Hi, With recent versions of R-devel, "R CMD check" complains about some "Rd files with unknown sections". [EMAIL PROTECTED]:~> R CMD check multtest_1.9.4.tar.gz ... ... * checking Rd files ... WARNING Rd files with unknown sections: /home/hpages/multtest.Rcheck/00_pkg_src/multtest/man/boot.res

Re: [Rd] Rd files with unknown sections

2006-02-01 Thread Herve Pages
That's a nice improvement. Thanks! H. Prof Brian Ripley wrote: > On Wed, 1 Feb 2006, Herve Pages wrote: > >> With recent versions of R-devel, "R CMD check" complains about >> some "Rd files with unknown sections". > > > It is new test (t

[Rd] update.packages() doesn't pick up the highest version of packages

2007-01-29 Thread Herve Pages
Hi, Try to install limma 2.8.1 with: > biocRep <- "http://bioconductor.org/packages/1.9/bioc"; > install.packages("limma", repos=biocRep) then try to update it with > repos <- c(biocRep, "http://cran.fhcrc.org";) > update.packages(repos=repos) --> it will not get updated (even if there

Re: [Rd] Speed of for loops

2007-01-30 Thread Herve Pages
Tom McCallum wrote: > Hi Everyone, > > I have a question about for loops. If you have something like: > > f <- function(x) { > y <- rep(NA,10); > for( i in 1:10 ) { > if ( i > 3 ) { > if ( is.na(y[i-3]) == FALSE ) { >

Re: [Rd] Speed of for loops

2007-01-30 Thread Herve Pages
Hi, Byron Ellis wrote: > IIRC a for loop has more per-iteration overhead that lapply, but the > real answer is "it depends on what you're doing exactly." I've seen it > be a faster, slower and equal approach. gen.iter = function(y=NA) { function(x) { y <<- if(is.na(y)) x else x+y } } sapply

[Rd] convolve: request for "usual" behaviour + some improvements + some fixes

2007-02-02 Thread Herve Pages
Hi again, There are many problems with current 'convolve' function. The author of the man page seems to be aware that 'convolve' does _not_ the usual thing: Note that the usual definition of convolution of two sequences 'x' and 'y' is given by 'convolve(x, rev(y), type = "o")'. and indeed, i

Re: [Rd] convolve: request for "usual" behaviour + some improvements + some fixes

2007-02-02 Thread Herve Pages
1:nz0] } else { if (type == "filter") z <- z[1:nx] } if (is.numeric(x) && is.numeric(y)) z <- Re(z) if (is.integer(x) && is.integer(y)) z <- as.integer(round(z)) z } In fact, it should try to be smarter th

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Herve Pages
Oleg Sklyar wrote: > Herve, it looks like 64-bit. I just tried another 32 bit version: > Windows build R-2.4.1 under VMWare on the same 64 bit Ubuntu as in my > post above and Windows version shows the same bug as you report: > > R2.4.1 on Windows 2000 as guest system in VMWare Ubuntu 6.10 64bit >

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Herve Pages
Hi Oleg, Oleg Sklyar wrote: > my R-SVN revision is 40458 compared to 40386 yours, could it be > corrected already? No I don't think so. Maybe an architecture specific problem? You are on a 64-bit system, I'm on a 32-bit system. I was able to reproduce on 3 systems so far (with any version of R):

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Herve Pages
Herve Pages wrote: > Hi Oleg, > > Oleg Sklyar wrote: >> my R-SVN revision is 40458 compared to 40386 yours, could it be >> corrected already? > > No I don't think so. Maybe an architecture specific problem? > You are on a 64-bit system, I'm on a 32-bit s

[Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Herve Pages
Hi, I have a big data frame: > mat <- matrix(rep(paste(letters, collapse=""), 5*30), ncol=5) > dat <- as.data.frame(mat) and I need to do some computation on each row. Currently I'm doing this: > for (key in row.names(dat)) { row <- dat[key, ]; ... do some computation on row... } w

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Herve Pages
Herve Pages wrote: ... > But if, instead of the above, I do this: > > > for (i in nrow(dat)) { row <- sapply(dat, function(col) col[i]) } Should have been: > for (i in 1:nrow(dat)) { row <- sapply(dat, function(col) col[i]) } > > then it's 20 times faster!

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Herve Pages
) user system elapsed 13.201 0.144 13.360 > system.time({mat2 <- as.matrix(dat2); for (i in 1:100) { row <- mat2[i, ] }}) user system elapsed 0.128 0.036 0.163 Big win isn't it? (only if you have enough memory for it though...) Cheers, H. > >

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Herve Pages
Best wishes >>Wolfgang >> >> Roger D. Peng wrote: >>> Extracting rows from data frames is tricky, since each of the columns could >>> be >>> of a different class. For your toy example, it seems a matrix would be a >>> more >

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Herve Pages
s > Wolfgang > > Roger D. Peng wrote: >> Extracting rows from data frames is tricky, since each of the columns >> could be of a different class. For your toy example, it seems a >> matrix would be a more reasonable option. >> >> R-devel has some improvements

Re: [Rd] extracting rows from a data frame by looping over the row names: performance issues

2007-03-02 Thread Herve Pages
Hi Greg, Greg Snow wrote: > Your 2 examples have 2 differences and they are therefore confounded in > their effects. > > What are your results for: > > system.time(for (i in 1:100) {row <- dat[i, ] }) > > > Right. What you suggest is even faster (and more simple): > mat <- matrix(rep(pas

Re: [Rd] Unexpected result of as.character() and unlist() applied to a data frame

2007-03-27 Thread Herve Pages
Liaw, Andy wrote: > Given that the behavior is exactly as I expected it be, I would call > that "feature" (and IMHO not a very special one). The two data frames > are just different (try str() on them: A in dd is factor, while A in > dd2 is character), so I don't know why you'd expect unlist() on

Re: [Rd] Limitation of dirname() and basename()

2007-03-27 Thread Herve Pages
Hi, Simon Urbanek wrote: > Your proposed behavior is inconsistent, anyway. The purpose of > dirname is to return parent directory of the entity represented by > the pathname. Mmmm, I don't think this is true: > dirname("aaa/..") [1] "aaa" "aaa" is not the parent directory of "aaa/.." S

[Rd] source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel

2007-04-03 Thread Herve Pages
Hi, I get this error with R-2.5.0 alpha and R-2.6.0 devel: > source("http://bioconductor.org/biocLite.R";, echo=TRUE) Error in if (timestamp != srcfile$timestamp) warning("Timestamp of '", : missing value where TRUE/FALSE needed Same with 'verbose=TRUE': > source("http://biocon

Re: [Rd] Problem with S4 inheritance: unexpected re-initialization?

2007-04-03 Thread Herve Pages
Hi Christian, I can only give you a few reasons why IMO it is very unlikely that anybody will be able to help you on this, with the current form of your post. 1) Unless you have a really good reason to do so, don't attach a package to your post. Do your best to provide a few lines of code that

Re: [Rd] source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel

2007-04-04 Thread Herve Pages
Duncan Murdoch wrote: > > Thanks for reporting this. > > This is now fixed and committed to svn. It will take a day or two for > the change to make it onto CRAN. OK. Thanks Martin and Duncan! Cheers, H. __ R-devel@r-project.org mailing list https://

Re: [Rd] Problem with S4 inheritance: unexpected re-initialization?

2007-04-04 Thread Herve Pages
Hi Christian, cstrato wrote: > Dear Herve > > Thank you for your helpful comments, and I especially appreciate that > you tried to run my package. I will try to answer each point separately. > > Herve Pages wrote: >> Hi Christian, >> >> I can only give

[Rd] 'R CMD check' fails when suggested package is not available

2007-04-04 Thread Herve Pages
Hi there, I was wondering why I get the following error message: * checking package dependencies ... ERROR Packages required but not available: Rmpi when I run 'R CMD check' on a package that _suggests_ Rmpi? Why isn't it OK to not have all the suggested packages installed? Maybe one of

Re: [Rd] Problem with S4 inheritance: unexpected re-initialization?

2007-04-05 Thread Herve Pages
Hi Cristian, cstrato wrote: [...] > Although SubSubClassB1 and SubSubClassB2 differ only slightly, the results > for "subsubB1" are correct, while "subsubB2" gives a wrong result, see: >> subsubB2 <- new("SubSubClassB2", filename="MyFileNameB2", > nameB="MyNameB") >> subsubB2 > An object of class

Re: [Rd] Problem with S4 inheritance: unexpected re-initialization?

2007-04-06 Thread Herve Pages
Martin, Martin Morgan wrote: > The funny effect where class(object) seems to trigger construction of > a new object is lazy evaluation -- the 'object' argument to > setValidity is not evaluated until needed, i.e., until class(object) > (anything would trigger this, including force(object)); only t

Re: [Rd] 'R CMD check' fails when suggested package is not available

2007-04-11 Thread Herve Pages
e field are enhanced by the package at hand. That's a point of view. But IMO it's rather the package at hand that is enhanced by the packages listed in the field (at least this is the case with Rmpi). Cheers, H. > > On Wed, 4 Apr 2007, Herve Pages wrote: > >> Hi the

Re: [Rd] R on Solaris 10 x64

2007-04-13 Thread Herve Pages
Hi David, Tai-Wei (David) Lin wrote: > Hi R Developers, > > Greg is helping me with debugging R on Solaris 10 x64. Please let us > know if you have any thoughts or tips that can help us debug this. > > Thanks, > > David > > > > > Using default transfer plist > in vector_io: perm

[Rd] Unexpected alteration of data frame column names

2007-05-15 Thread Herve Pages
Hi, I'm using data.frame(..., check.names=FALSE), because I want to create a data frame with duplicated column names (in the real life you can get such data frame as the result of an SQL query): > df <- data.frame(aa=1:5, aa=9:5, check.names=FALSE) > df aa aa 1 1 9 2 2 8 3 3 7

[Rd] 'R CMD INSTALL mypkg' doesn't always update help pages

2007-06-05 Thread Herve Pages
Hi, 'R CMD INSTALL mypkg' and 'install.packages(mypkg, repos=NULL)' don't update mypkg help pages when mypkg is a source directory. They only install new help pages if there are some but they leave the already installed pages untouched. So you end up with mixed man pages from different versions of

Re: [Rd] C function with unknown output length

2007-06-06 Thread Herve Pages
Vincent Goulet wrote: > Hi all, > > Could anyone point me to one or more examples in the R sources of a C > function that is called without knowing in advance what will be the > length (say) of the output vector? > > To make myself clearer, we have a C function that computes > probabilities

Re: [Rd] R.INSTALL on Windows

2007-06-13 Thread Herve Pages
Hi, This has been addressed in R-2.5.0 and R-2.6.0. Thanks! H. Herve Pages wrote: > Hi, > > I'd like to point out a potential problem with the current R.INSTALL > directory created by 'R CMD INSTALL' when applied to a source package. > > On Windows (and

[Rd] Missing args with a default value in S4 methods

2007-06-14 Thread Herve Pages
Hi, Strange things happen with missing args in S4 methods: > setGeneric("mygen", signature="x", function(x, ...) standardGeneric("mygen")) [1] "mygen" > setMethod("mygen", "character", function(x, y=12, z, ...) {cat(missing(y), "\n"); cat(y, "\n")}) [1] "mygen" > mygen("aa", z=99)

Re: [Rd] Missing args with a default value in S4 methods

2007-06-15 Thread Herve Pages
o <- function(x, y=12, z) bar(x, y, z) > foo("aa", ,"bb") FALSE aa 12 bb Behaviour is _almost_ the same! 3) Default arg in the generic _and_ in the method: o generic + method: > bar <- function(x, y=999, z) {cat(missing(y), "\n"); c

[Rd] [[.data frame and row names

2007-07-11 Thread Herve Pages
Hi, I'm wondering why indexing a data frame by row name doesn't work with [[. It works with [: > sw <- swiss[1:5,1:2] > sw["Moutier", "Agriculture"] [1] 36.5 but not with [[: > sw[["Moutier", "Agriculture"]] Error in .subset2(.subset2(x, ..2), ..1) : subscript out of bounds The probl

[Rd] Generics in base with no ...

2007-07-12 Thread Herve Pages
Hi, Some generics in base that don't have the ... extra argument: rev(), t(), scale() and unlist(). Is there any plan to make these more reusable? I used to be interested in having a rev() method for my objects, but since I needed an extra argument for it, then I was forced to create my own generi

Re: [Rd] Generics in base with no ...

2007-07-12 Thread Herve Pages
Duncan Murdoch wrote: > On 12/07/2007 6:17 PM, Herve Pages wrote: >> Hi, >> >> Some generics in base that don't have the ... extra argument: >> rev(), t(), scale() and unlist(). Is there any plan to make these >> more reusable? I used to be interested in h

[Rd] seq_along() doesn't use _my_ length

2007-07-12 Thread Herve Pages
Hi, According to seq_along man page, 'seq_along(x)' is equivalent to 'seq_len(length(x))' but apparently not if 'x' is an S4 object with a defined "length" method: > seq_along(letters[11:15]) [1] 1 2 3 4 5 > setClass("A", representation(titi="character")) [1] "A" > setMethod("length",

[Rd] Embedded nuls in strings

2007-08-07 Thread Herve Pages
Hi, ?rawToChar 'rawToChar' converts raw bytes either to a single character string or a character vector of single bytes. (Note that a single character string could contain embedded nuls.) Allowing embedded nuls in a string might be an interesting experiment but it seems to cause s

Re: [Rd] Embedded nuls in strings

2007-08-07 Thread Herve Pages
Duncan Murdoch wrote: > On 07/08/2007 5:06 PM, Herve Pages wrote: >> Hi, >> >> ?rawToChar >> 'rawToChar' converts raw bytes either to a single character string >> or a character vector of single bytes. (Note that a single >>

Re: [Rd] Embedded nuls in strings

2007-08-07 Thread Herve Pages
Duncan Murdoch wrote: > On 07/08/2007 6:29 PM, Herve Pages wrote: [...] >> Same for serialization: >> >>> save(string0, file="string0.rda") >>> load("string0.rda") >>> string0 >> [1] "ABCD" > > Of these,

[Rd] Compilation error with R-devel_2007-08-12.tar.gz snapshot

2007-08-13 Thread Herve Pages
Hi, I get a compilation error with last available R devel snapshot (R-devel_2007-08-12.tar.gz, r42483): CONFIGURE [EMAIL PROTECTED]:~/R-2.6.broken> ~/src/R-2.6.r42483/configure checking build system type... x86_64-unknown-linux-gnu checking host system

Re: [Rd] Compilation error with R-devel_2007-08-12.tar.gz snapshot

2007-08-13 Thread Herve Pages
Problem gone with new snapshot (2007-08-13, r42496). Thanks! H. Herve Pages wrote: > Hi, > > I get a compilation error with last available R devel > snapshot (R-devel_2007-08-12.tar.gz, r42483): > > > CONFIGURE > > [EMAI

[Rd] rggobi not in bin/macosx/universal/contrib/2.6/PACKAGES on CRAN

2007-09-25 Thread Herve Pages
Hi, R-2.6 + install.packages() doesn't find rggobi on Mac OS X. The .tgz file is here: http://cran.fhcrc.org/bin/macosx/universal/contrib/2.6/ but it is not listed in the PACKAGES file: http://cran.fhcrc.org/bin/macosx/universal/contrib/2.6/PACKAGES Any idea why? Thanks! H. _

Re: [Rd] rggobi not in bin/macosx/universal/contrib/2.6/PACKAGES on CRAN

2007-09-26 Thread Herve Pages
, 2007, at 4:28 PM, Simon Urbanek wrote: > >> >> On Sep 25, 2007, at 12:58 PM, Herve Pages wrote: >> >>> Hi, >>> >>> R-2.6 + install.packages() doesn't find rggobi on Mac OS X. >>> The .tgz file is here: >>> >>> ht

Re: [Rd] rggobi not in bin/macosx/universal/contrib/2.6/PACKAGES on CRAN

2007-09-26 Thread Herve Pages
hadley wickham wrote: [...] > I've fixed the problem with GGobi, and Simon has updated the version > on CRAN, so you should be able to get a binary version again v. soon. Thanks! H. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/lis

[Rd] Virtual class with no slots

2007-09-26 Thread Herve Pages
Hi, It seems there are 2 slightly different ways to create a virtual class with no slots (a kind of Java "interface"): with or without specifying 'representation("VIRTUAL")'. > setClass("A", representation("VIRTUAL")) [1] "A" > showClass("A") Virtual Class No Slots, prototype of class

[Rd] breaking my "length" method also breaks str()

2007-09-26 Thread Herve Pages
Hi, This works fine and gives 26: setClass("A", representation(bidule="character")) setMethod("length", "A", function(x) length([EMAIL PROTECTED])) a <- new("A", bidule=letters) str(a) length(a) But if my "length" method is broken, then str() stops working: > setMethod("length", "A"

[Rd] 'R CMD build' and file permissions

2007-10-05 Thread Herve Pages
Hi, When building a source package on Linux with 'R CMD build', the files in the resulting tarball don't have the original permissions. The problem is that the packages I want to build include an SQLite data base (an .sqlite file) and, before I run 'R CMD build', I've made this file read-only (chm

[Rd] install.packages() and configure.args

2007-10-19 Thread Herve Pages
Hi, In the case where install.packages("packageA") also needs to install required package "packageB", then what is passed thru the 'configure.args' argument seems to be lost when it's the turn of packageA to be installed (the last package to get installed). This is not easy to reproduce but let's

[Rd] Change in write.dcf() that breaks existing code

2007-11-26 Thread Herve Pages
Hi, When writing a DCF file one record at a time, the records used to be separated by an empty line in R-2.5, but not in R-2.6: x <- data.frame(aa=letters[1:3], ii=1:3) With R-2.5: > x <- data.frame(aa=letters[1:3], ii=1:3) > for (i in seq_len(nrow(x))) write.dcf(x[i, ,drop=FALSE]) aa:

[Rd] Pb with defineVar() example in the "Writing R Extensions" manual

2008-01-15 Thread Herve Pages
Hi, I'm wondering if this code from the "Writing R Extensions" manual is really safe: SEXP mkans(double x) { SEXP ans; PROTECT(ans = allocVector(REALSXP, 1)); REAL(ans)[0] = x; UNPROTECT(1); return ans; } double feval(double x, SEX

Re: [Rd] Pb with defineVar() example in the "Writing R Extensions" manual

2008-01-16 Thread Herve Pages
Hi Peter, Peter Dalgaard wrote: > Herve Pages wrote: >> Hi, >> >> I'm wondering if this code from the "Writing R Extensions" manual >> is really safe: >> >> SEXP mkans(double x) >> { >> SEXP ans; >>

Re: [Rd] Pb with defineVar() example in the "Writing R Extensions" manual

2008-01-16 Thread Herve Pages
Peter Dalgaard wrote: > Herve Pages wrote: >> Hi Peter, >> >> Peter Dalgaard wrote: >> >>> Herve Pages wrote: >>> >>>> Hi, >>>> >>>> I'm wondering if this code from the "Writing R Extensions" ma

Re: [Rd] Pb with defineVar() example in the "Writing R Extensions" manual

2008-01-16 Thread Herve Pages
Peter Dalgaard wrote: > Herve Pages wrote: [...] >> So everybody seems to assume that SET_ELEMENT(), SET_STRING_ELT(), >> SET_NAMES(), etc... can't (and will never) trigger garbage collection. >> But what about defineVar()? More generally, how do I know this for the >

[Rd] Problem with new("externalptr")

2008-01-29 Thread Herve Pages
Hi, It seems that new("externalptr") is always returning the same instance, and not a new one as one would expect from a call to new(). Of course this is hard to observe: > new("externalptr") > new("externalptr") since not a lot of details are displayed. For example, it's easy to see

Re: [Rd] Problem with new("externalptr")

2008-01-29 Thread Herve Pages
ot; instance x to a C routine, I need to perform one extra step to reach the externalptr (need to pass [EMAIL PROTECTED] to the routine instead of x itself). So unfortunately, things are quite ugly and more painful than necessary. Thanks, H. Herve Pages wrote: > Hi, > > It se

Re: [Rd] Problem with new("externalptr")

2008-01-29 Thread Herve Pages
Luke Tierney wrote: > On Tue, 29 Jan 2008, Herve Pages wrote: > >> Hi again, >> >> Here is an example of an annoyance that I think is directly related to >> the >> problem with new("externalptr"). When you try to extend the >> "extern

[Rd] segfault in gregexpr()

2008-01-30 Thread Herve Pages
Hi, Tried with R 2.6 and R 2.7: > gregexpr("", "abc", fixed=TRUE) *** caught segfault *** address 0x1c09000, cause 'memory not mapped' Traceback: 1: gregexpr("", "abc", fixed = TRUE) Possible actions: 1: abort (with core dump, if enabled) 2: normal R exit 3: exit R without

Re: [Rd] segfault in gregexpr()

2008-01-31 Thread Herve Pages
Hi Seth, Seth Falcon wrote: > Hi again, > >> Herve wrote: >> > gregexpr("", "abc", fixed=TRUE) >> >>*** caught segfault *** >> address 0x1c09000, cause 'memory not mapped' > > This should be fixed in latest svn. Thanks for the report. That's great. Thanks! H. > > + seth > _

Re: [Rd] Pb with lapply()

2008-02-07 Thread Herve Pages
no simple solution indeed. Cheers, H. Martin Maechler wrote: >>>>>> "HP" == Herve Pages <[EMAIL PROTECTED]> >>>>>> on Thu, 31 Jan 2008 10:26:31 -0800 writes: > > HP> Hi, If needed, lapply() tries to convert its first > H

[Rd] coerce methods and inheritance

2008-04-09 Thread Herve Pages
Hi, It doesn't seem that the dispatching algo is finding my coerce method under some circumstances. Let's say I have 2 classes, A and AA and that AA is just a direct extension of A with no additional slots: setClass("A", representation(ii="integer")) setClass("AA", contains="A") I can defi

[Rd] autocompletion problem

2008-04-09 Thread Herve Pages
Hi, Let's create the xxx object just to avoid confusion even if it's not necessary for reproducing the problem below: xxx <- 8:3 If I start typing this: max(xxx[ and now try to autocomplete with , then I get the following error (and a warning): > max(xxx[Error in grep(sprintf("^%s",

Re: [Rd] autocompletion problem

2008-04-09 Thread Herve Pages
Hi Deepayan, Deepayan Sarkar wrote: > On 4/9/08, Herve Pages <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Let's create the xxx object just to avoid confusion even if it's not >> necessary >> for reproducing the problem below: >> >>

Re: [Rd] coerce methods and inheritance

2008-04-09 Thread Herve Pages
Hi John, John Chambers wrote: > Herve Pages wrote: >> Hi, >> >> It doesn't seem that the dispatching algo is finding my coerce method >> under >> some circumstances. >> Let's say I have 2 classes, A and AA and that AA is just a dire

[Rd] Pb with validObject(..., complete=TRUE)

2008-04-15 Thread Herve Pages
Hi, When called with complete=TRUE, validObject() is supposed to work in a recursive manner. But here is a situation where it doesn't seem to be the case. Let's define a class with a validity method: setClass("PosInts", representation(ii="integer")) setValidity("PosInts", function(ob

Re: [Rd] Pb with validObject(..., complete=TRUE)

2008-04-16 Thread Herve Pages
onable to assume you really want the whole > truth, even if it takes a bit longer. Absolutely. Thanks for looking into this! Cheers, H. > > Unless there are counter-arguments, we'll make this change (not, > however, for 2.7.0) > > John > > Herve Pages wrote: >

[Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Herve Pages
Hi, Couldn't is.unsorted() bail out immediately here (after comparing the first 2 elements): > x <- 2000:1 > system.time(is.unsorted(x), gcFirst=TRUE) user system elapsed 0.084 0.040 0.124 > x <- 2:1 > system.time(is.unsorted(x), gcFirst=TRUE) user system elapsed

Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-17 Thread Herve Pages
analysis be from this change? > > On Thu, 17 Apr 2008, Bill Dunlap wrote: > >> On Thu, 17 Apr 2008, Herve Pages wrote: >> >>> Couldn't is.unsorted() bail out immediately here (after comparing >>> the first 2 elements): >>> >>> >

Re: [Rd] Couldn't (and shouldn't) is.unsorted() be faster?

2008-04-18 Thread Herve Pages
Prof Brian Ripley wrote: > On Thu, 17 Apr 2008, Herve Pages wrote: [...] >> BTW, why not make is.unsorted() a little bit more prepared to silly user >> input: > > Because R is a volunteer project and resources spent on trapping misuse > are resources not available to

[Rd] Pb with package::foo(x) <- value

2008-04-18 Thread Herve Pages
Hi, The parser doesn't seem to like this: somePackage::foo(x) <- value somePackage:::foo(x) <- value where foo() is a replacement function or method defined in package somePackage. For example: > x <- integer(4) > base::length(x) <- 7 Error in base::length(x) <- 7 : invalid func

Re: [Rd] R 2.7.0, match() and strings containing \0 - bug?

2008-04-28 Thread Herve Pages
Hi Jon, Jon Clayden wrote: Hi, A piece of my code that uses readBin() to read a certain file type is behaving strangely with R 2.7.0. This seems to be because of a failure to match() strings after using rawToChar() when the original was terminated with a "\0" character. Direct equality testing

[Rd] rowSums()/colSums() don't preserve the 'integer' storage mode

2008-07-16 Thread Herve Pages
Hi, Wouldn't that make sense to have rowSums()/colSums() to preserve the storage mode? m <- matrix(1:15, nrow=5) > storage.mode(m) [1] "integer" > storage.mode(sum(m)) [1] "integer" > storage.mode(rowSums(m)) [1] "double" <--- surprising! Cheers, H. _

Re: [Rd] rowSums()/colSums() don't preserve the 'integer' storage mode

2008-07-17 Thread Herve Pages
you think it is, anyway. Bill Venables. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Herve Pages Sent: Thursday, 17 July 2008 3:48 PM To: R-devel@r-project.org Subject: [Rd] rowSums()/colSums() don't preserve the 'integer' storage mo

Re: [Rd] Cannot link mypackage to 2 other packages

2008-08-08 Thread Herve Pages
Prof Brian Ripley wrote: Thanks for the examples. The specific problems was a typo, but there was another on Windows (missing quotes). This should work in R-patched and R-devel on Linux and Windows now. Yes this works now. Thanks! H. On Thu, 7 Aug 2008, Herve Pages wrote: Prof Brian

[Rd] Defining an alias for a generic function and callNextMethod() strange behaviour

2008-09-09 Thread Herve Pages
Hi, My package contains the following foo() generic and methods (simplified version): setGeneric("foo", signature="x", function(x, y=NA) standardGeneric("foo")) setMethod("foo", "ANY", function(x, y=NA) list(x, y)) setMethod("foo", "character", function(x, y=NA) unlist(callNextMethod()))

[Rd] 'R CMD config' doesn't work on Windows

2006-05-17 Thread Herve Pages
Hi everybody, I'd like to report this problem I have on Windows with R 2.2.1, R 2.3.0, R-2.3.0 patched (r38086) and R 2.4.0 devel (r37925): D:\hpages>R\bin\R CMD config CC Can't open perl script "D:\hpages\R-2.3.1/bin/config": No such file or directory Best, H. -- -

[Rd] 'R CMD ' doesn't work on Windows

2006-05-17 Thread Herve Pages
Hi, Something else I'd like to report. If a segmentation fault occurs during the "creating vignettes" step, then 'R CMD build' ignores the problem and end up building the source package anyway: /loc/biocbuild/1.9d/R/bin/R CMD build RMAGEML * checking for file 'RMAGEML/DESCRIPTION' ... OK

[Rd] 'R CMD build' ignoring segfaults occuring during the vignettes creation

2006-05-17 Thread Herve Pages
Sorry for erroneous subject of my previous post. Here it goes again. Hi, Something else I'd like to report. If a segmentation fault occurs during the "creating vignettes" step, then 'R CMD build' ignores the problem and

[Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows

2006-06-08 Thread Herve Pages
Hello, Man page for 'install.packages' says that if the 'lib' arg is missing, then it "defaults to '.libPaths()[1]' with a warning". But, given the 'install.packages' source code, it seems that this warning is issued only when 'length(.libPaths()) > 1'. So typically, this warning will appear on Ma

[Rd] install.packages("C", dep=TRUE) does not always install indirect dependencies

2006-06-08 Thread Herve Pages
Hello again, I've found another issue with 'install.packages'. 'install.packages("C", dep=TRUE)' will "fail" when the 2 following conditions are satisfied: - Package C depends on B which in turns depends on A but the Depends field in C doesn't list A. - Package B is already installed but n

Re: [Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows

2006-06-08 Thread Herve Pages
Prof Brian Ripley wrote: > On Thu, 8 Jun 2006, Herve Pages wrote: > >> Man page for 'install.packages' says that if the 'lib' arg is missing, >> then it "defaults to '.libPaths()[1]' with a warning". >> But, given the 'install.pa

Re: [Rd] install.packages("C", dep=TRUE) does not always install indirect dependencies

2006-06-09 Thread Herve Pages
Duncan Murdoch wrote: > On 6/8/2006 3:31 PM, Herve Pages wrote: >> May be this is the desired behavior, I don't know. Personally, I would >> think of 'install.packages("C", dep=TRUE)' as a reliable way to get >> every >> packages that C direct

Re: [Rd] install.packages() does not warn when 'lib' arg is missing on Linux or Windows

2006-06-09 Thread Herve Pages
Simon Urbanek wrote: > On Jun 8, 2006, at 9:08 PM, Herve Pages wrote: > >> Man page for 'install.packages' says that if the 'lib' arg is missing, >> then it "defaults to '.libPaths()[1]' with a warning". > > Where are you qu

[Rd] download.packages() ignores too recent packages

2006-08-11 Thread Herve Pages
Hi list, I don't know if it's a bug or a feature but I can't download a package that requires a more recent version of R than the one I'm currently using for the download: > rep <- "http://bioconductor.org/packages/1.9/bioc"; > download.packages("Biobase", destdir=".", repos=rep) Wa

Re: [Rd] install.packages(,type="source") broken on Windows

2006-09-08 Thread Herve Pages
OK thanks. Just FYI the same thing happens with R version 2.5.0 devel (2006-09-07 r39185). Best, H. Peter Dalgaard wrote: > [EMAIL PROTECTED] writes: > > >> Hi, >> >> On Windows, 'install.packages(,type="source")' displays the same output >> than 'R CMD INSTALL --help' and doesn't install anyt

[Rd] Strange behaviour of the [[ operator

2006-09-29 Thread Herve Pages
Hi, This looks like a bug: > a <- list(b=5) > a[['b']] [1] 5 > a[[t<-'b']] Nothing gets printed! I need to use parenthesis to see the expected result: > a[[(t<-'b')]] [1] 5 Cheers, H. __ R-devel@r-project.org mailing list h

[Rd] More strange [[ behaviour

2006-10-02 Thread Herve Pages
Hi, > setClass("MyList", "list") [1] "MyList" > a <- new("MyList") > a An object of class "MyList" list() > setMethod("[[", "MyList", function(x, i, j, ...) cat("Just testing\n")) > a[[]] Just testing > a[[1]] Just testing > a[[a=1]] Just testing > a[[b=1]] Just testing ... > a[[v=1]] Just testing

Re: [Rd] More strange [[ behaviour

2006-10-02 Thread Herve Pages
Duncan Murdoch wrote: > On 10/2/2006 3:21 PM, Herve Pages wrote: >>> a[[x=1]] >> Error in a[[x = 1]] : subscript out of bounds >> > > Indexing is a function call, with arguments x, i, j, ... . If you use > y=1, you're setting something in the "..."

[Rd] Display problem with named raw vectors

2006-10-03 Thread Herve Pages
Hi, I found that displaying a raw vector with long names is not as pretty as for other types of named vectors: > r <- charToRaw("Mz") > r [1] 4d 7a > names(r) <- c("M", "zz") > r M zz 4d 7a The names and the values are not aligned :-( > i <- as.inte

[Rd] Last R-devel snapshot is an empty tarball

2006-10-04 Thread Herve Pages
Dear list, The last R-devel snapshot (2006-10-03) is an empty tarball: ftp://ftp.stat.math.ethz.ch/Software/R/ Thanks, H. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

  1   2   >