Re: [Rd] matrix

2008-04-16 Thread Martin Maechler
> "YJ" == Yuan Jian <[EMAIL PROTECTED]> > on Wed, 16 Apr 2008 18:42:53 -0700 (PDT) writes: YJ> thanks, YJ> can I ask another basic question? yes, but *NOT* on R-devel. PLEASE! There seems to be a recent tendency to misuse R-devel for things that *REALLY* *ONLY* belong to

Re: [Rd] matrix

2008-04-16 Thread Yuan Jian
thanks, can I ask another basic question? I have a matrix (1 X 6). 1 rows and 6 columns. I want to remove rows that have sd(col1, col2,col3) <1 or sd(col4,col5,col6) <1. what is the simple way? Yu Duncan Murdoch <[EMAIL PROTECTED]> wrote: On 16/04/2008 7:33 PM, Yuan

Re: [Rd] matrix

2008-04-16 Thread Duncan Murdoch
On 16/04/2008 7:33 PM, Yuan Jian wrote: > Hello, > I have a matrix, I want to change value to 0 when a element in the matrix > has less than 10. > do you know how to do it without using loops? A[A < 10] <- 0 Remember that matrices are just vectors with dimensions, so you can index one like

[Rd] matrix

2008-04-16 Thread Yuan Jian
Hello, I have a matrix, I want to change value to 0 when a element in the matrix has less than 10. do you know how to do it without using loops? - [[alternative HTML version deleted]] __

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

2008-04-16 Thread Herve Pages
Hi John, John Chambers wrote: > The "infelicity" arises because validObject() is not a generic function; > validity "method" is a bit of a misnomer. Indeed. And I guess referring to "method dispatch" like I did in my previous email is not appropriate either. So yes I learned that thinking of val

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

2008-04-16 Thread John Chambers
The "infelicity" arises because validObject() is not a generic function; validity "method" is a bit of a misnomer. The functions are attached to the class definition and validObject looks for them directly--in the process it catches all methods from superclasses, but not from superclasses of t

Re: [Rd] C++ complains abouct Rprintf signature

2008-04-16 Thread Prof Brian Ripley
Please see the posting guide: For questions about unexpected behavior or a possible bug, you should, at a minimum, copy and paste the output from sessionInfo() into your message. ... If you are using an old version of R and think it does not work properly, upgrade to the latest vers

[Rd] C++ complains abouct Rprintf signature

2008-04-16 Thread Vadim Organovich
Dear R-devel, My g++ complains about the first argument to Rprintf being non-const char *. For example when compiling the line Rprintf("hello world\n"); the following warning is emitted: warning: deprecated conversion from string constant to 'char*' Is there a reason for the non-const? It is

[Rd] methods::is problem in R 2.7.0 & R 2.8.0 devel

2008-04-16 Thread ml-it-r-devel
Hi, x <- 1L class(x) <- c("myInt", "integer") is(x) Error in inherits(x, "factor") : argument "class2" is missing, with no default The problem arises when is() is used with only one argument (object) which has more than one class reported by class(object). In the code is() does use variable "c

Re: [Rd] getNativeSymbolInfo fails with Fortran symbol.

2008-04-16 Thread Thomas Petzoldt
Prof Brian Ripley wrote: > It's a bug -- unlike is.loaded, getNativeSymbolInfo seems unaware of > Fortran names unless registered. > > Will be fixed in 2.7.0. > > On Wed, 9 Apr 2008, [EMAIL PROTECTED] wrote: > >> >> In the following code routine 'initaquaphy' is defined in Fortran, >> and dynam