Re: [R] statment can tacke value in row1 and rows

2020-09-02 Thread Jim Lemon
Hi Hesham, It think you are looking for something like this: truth<-data.frame(G1=sample(LETTERS[1:4],20,TRUE), G2=sample(LETTERS[1:4],20,TRUE)) truth truth$G3<-as.numeric(truth$G1 == truth$G2) truth Note that like quite a few emails produced with Javascript formatting, there are embedded charac

Re: [R] statment can tacke value in row1 and rows

2020-09-02 Thread Bert Gunter
Please re-post in plain text. This is a plain text list and html can get messed up, as here. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Sep 2, 2020 a

[R] statment can tacke value in row1 and rows

2020-09-02 Thread Hesham A. AL-bukhaiti via R-help
hello.I have this code :#3#read data just thee columns. first and second columns are catogary , third column  is number.  out<-read.csv("outbr.csv") truth<-out[,seq(1,2)] #truth about 2000 rows, some values in row1 can  show in rows2,and the some values in row2 can