Skip to content
Prev 206249 / 398503 Next

Operating on each row of data frame

Hi,

does this do what you want?

d <- cbind(d,apply(d[,c(2,3,4)],1,mean),apply(d[,c(2,3,4)],1,sd))

HTH,
Stephan


Abhishek Pratap schrieb: