I have a matrix: https://dl.dropbox.com/u/22681355/mat.csv
mat<-read.csv("mat.csv")
sub<-c(123,132)
I would like to change the value in the 7th column of mat for those rows where mat$V2=sub
I can select this subset using:
set<- subset(mat, mat$V2 %in% sub)
set[,7]<-set[,7]+1
and then somehow match the ‘set’ with the same rows in ‘mat’.
But is there an easier way to do this?
you should watch some twotorials