[Rd] .net and R
Hi, is it possible to call R functions from visual studio .net such as c#? - [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] && and ||
Hello there, I got a small problem about logical calculation: we can get a sequene from a+b as below: > a<-c(1,2) > b<-c(3,4) > a+b [1] 4 6 but when the sequences are logical. (I want to get (True,False) && (True, True) ==> (True, False), but when I do as below. > e<-c(T,T) > f<-c(F,T) > e [1] TRUE TRUE > f [1] FALSE TRUE > g<-e && f **g becomes one logical value only > g [1] FALSE > what should I do when I want to get a sequence for operate && or ||? kind regards Yu [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] && and ||
Berwin A Turlach <[EMAIL PROTECTED]> wrote: G'day Yu, On Sun, 13 Apr 2008 23:48:33 -0700 (PDT) Yuan Jian wrote: > what should I do when I want to get a sequence for operate && or ||? Read `help("&&")' and then use & and |. :) HTH. Cheers, Berwin === Full address = Berwin A Turlach Tel.: +65 6515 4416 (secr) Dept of Statistics and Applied Probability +65 6515 6650 (self) Faculty of Science FAX : +65 6872 3919 National University of Singapore 6 Science Drive 2, Blk S16, Level 7 e-mail: [EMAIL PROTECTED] Singapore 117546 http://www.stat.nus.edu.sg/~statba [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] matrix
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]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] matrix
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 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 a vector. Duncan Murdoch - [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel