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

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

2008-07-17 Thread Herve Pages
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 mode Hi, Wouldn't that make sense to have rowSums()/colSums() to preserve the storage mode? m - matrix(1

[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] 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

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 be spent on other things. (Same

[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 function

[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
, 17 Apr 2008, Herve Pages wrote: 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

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

2008-04-16 Thread Herve Pages
(not, however, for 2.7.0) John Herve Pages wrote: 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

[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(object)

[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 define a

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: xxx - 8:3 If I start typing this: max(xxx[ and now try to autocomplete

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 direct extension of A with no additional slots: setClass

Re: [Rd] Pb with lapply()

2008-02-07 Thread Herve Pages
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 HP argument into a list before it starts doing something HP with it: lapply HP

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

[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 saving

[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) pointer: (nil) new(externalptr) pointer: (nil) since not a lot of details are displayed. For

Re: [Rd] Problem with new(externalptr)

2008-01-29 Thread Herve Pages
, H. Herve Pages wrote: 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) pointer: (nil) new(externalptr) pointer: (nil) since not a lot

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 externalptr class: You don't wnat to do that for the same reason you don't want

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; PROTECT(ans = allocVector(REALSXP, 1)); REAL(ans)[0] = x; UNPROTECT(1

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 manual is really safe: SEXP mkans(double x) { SEXP ans; PROTECT(ans = allocVector(REALSXP, 1

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 functions/macros listed in Rdefines.h

[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, SEXP

[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: a

[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] '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

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

2007-09-26 Thread Herve Pages
, 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: 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

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

[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 S4

[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, function(x)

[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] Compilation error with R-devel_2007-08-12.tar.gz snapshot

2007-08-14 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 [EMAIL PROTECTED]:~/R-2.6.broken ~/src/R-2.6

[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

[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

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 character string could contain embedded nuls.) Allowing embedded

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, I'd say the serialization is the only case where it would be reasonable to fix the behaviour. R depends on C run

[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

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 having a rev() method for my objects, but since I

[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, A,

[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 problem is

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

2007-06-15 Thread Herve Pages
find the current behaviour confusing and very hard to predict. Cheers, H. Herve Pages wrote: 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

[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) TRUE 12

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, AFAIK, only on Windows), 'R CMD INSTALL

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 until

[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

[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

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 then

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 SubSubClassB2

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 you a few reasons why IMO it is very unlikely

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/.. Same here:

[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... } which

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

2007-03-02 Thread Herve Pages
0.128 0.036 0.163 Big win isn't it? (only if you have enough memory for it though...) Cheers, H. R-devel has some improvements to row extraction, if I remember correctly. You might want to try your example there. -roger Herve Pages wrote: Hi, I have a big data frame

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

2007-03-02 Thread Herve Pages
be of a different class. For your toy example, it seems a matrix would be a more reasonable option. R-devel has some improvements to row extraction, if I remember correctly. You might want to try your example there. -roger Herve Pages wrote: Hi, I have a big data frame: mat - matrix

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(paste(letters,

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):

[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, it

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

2007-02-02 Thread Herve Pages
- as.integer(round(z)) z } In fact, it should try to be smarter than that and not use the fft at all when one of the 2 input sequences is very short (less than 3 or 4) or e.g. when one is 1 times shorter than the other one. Cheers, H. Herve Pages wrote: Hi again, There are many

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] 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 is a 2.9.8

[Rd] file.copy

2007-01-16 Thread Herve Pages
Hi, Copying a non-existing file with file.copy creates an empty file r - file.copy(non-existing-file, .) r [1] TRUE ... and returns TRUE! Now, when used in vectorized mode r - file.copy(c(toto1, toto2), c(dest1, dest2)) [1] FALSE FALSE file.copy looks much more reasonable,

[Rd] R.INSTALL on Windows

2007-01-12 Thread Herve Pages
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, AFAIK, only on Windows), 'R CMD INSTALL mypackage_1.0.0.tar.gz' creates a temporary R.INSTALL directory in the current directory. This

[Rd] Can't load XML_1.4-0.zip in last R devel

2007-01-05 Thread Herve Pages
Hi, I can't load XML_1.4-0.zip in last R devel (Windows): R version 2.5.0 Under development (unstable) (2007-01-05 r40386) Copyright (C) 2007 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to

Re: [Rd] pb in regular expression with the character - (PR#9437)

2007-01-05 Thread Herve Pages
Hi all, [EMAIL PROTECTED] wrote: Consider my guesstimate: For 99% of all R users, the amount of time they need working pretty intensely with R before they find a bug in it, is nowadays more than three years, and maybe even much more -- such as their lifetime :-) Perhaps I belong to the

Re: [Rd] man page for as.matrix for data frames outdated?

2006-11-03 Thread Herve Pages
Hi Martin, Thanks for the answer! OK I can use data.matrix to convert a data frame to a numeric matrix but that's another story. Basically I'm reporting 2 problems with 'as.matrix' when applied to a data frame: 1) A documentation problem: The method for data frames will convert any

[Rd] man page for as.matrix for data frames outdated?

2006-11-02 Thread Herve Pages
Hi again, The man page for 'as.matrix' says: 'as.matrix' is a generic function. The method for data frames will convert any non-numeric/complex column into a character vector using 'format' and so return a character matrix, except that all-logical data frames will be coerced

Re: [Rd] Pb with .findInheritedMethods

2006-10-27 Thread Herve Pages
Hi John, John Chambers wrote: A problem with callNextMethod, which is caching an inherited method as if it was not inherited, causing confusion on the next search. Should be fairly easy to fix, but may be a while before I get time to do so. By the way, I hope your simplified example does

[Rd] Pb with .findInheritedMethods

2006-10-26 Thread Herve Pages
Hi again, Here is a very simplified version of a class hierarchy defined in the Biobase package (Bioconductor). I post here because this seems to be an S4 related problem: setClass(A, representation(name=character)) setMethod(initialize, A, function(.Object) [EMAIL PROTECTED] - I'm

Re: [Rd] S4 pb in R 2.5.0

2006-10-26 Thread Herve Pages
Herve Pages wrote: ... sessionInfo() R version 2.4.0 (2006-10-03) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US;LC_NUMERIC=C;LC_TIME=en_US;LC_COLLATE=en_US;LC_MONETARY=en_US;LC_MESSAGES=en_US;LC_PAPER=en_US;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT

[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

[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.integer(r) i

[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 a[[w=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 ... part of the arg list. If you say x=1, you're setting

[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

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 anything...

[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) Warning in

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 directly or indirectly relies on installed. This seems rather

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 quoting from? I read (R 2.3.1): Hi Simon, I was quoting from the description

[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 Mac

[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 not

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.packages' source code, it seems that this warning is issued only when 'length

[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:\hpagesR\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] 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$sub - 1 # One

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 to

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 fine

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 fine

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 tree), i.e.

[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 make

[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