Re: [R] truth[(truth[, 1]=="G3" & truth[, 2]=="G2") | (truth[, 1]=="G2" & truth[, 2]=="G3"), 3]<-1

2020-09-06 Thread Michael Dewey
I am afraid this is completely unreadable because you posted in HTML ad this is a plain text list. Best to resend it having set your mailer to send plain text as HTML gets mangled here. Michael On 06/09/2020 10:58, Hesham A. AL-bukhaiti via R-help wrote: helloout<-read.csv("outbr.csv")truth<-

[R] truth[(truth[, 1]=="G3" & truth[, 2]=="G2") | (truth[, 1]=="G2" & truth[, 2]=="G3"), 3]<-1

2020-09-06 Thread Hesham A. AL-bukhaiti via R-help
helloout<-read.csv("outbr.csv")truth<-out[,seq(1,2)]for example :  If row1= G1 and row2=G2 , and row 1 = G2 and row 2= G1,make G3=1 # note G1 and G2 are values from 1 to 2000 #if this happend add to thrid column in truth 1 otherwise add 0 as in statment follow truth<-cbind(as.character(truth[,1])