I am a newbie to R and seek help to calculate sums of selected column for each row. My simple data frame is as below.
data = data.frame(location = c(\"a\",\"b\"
OK, if you want a separate dataframe:
> data.frame(X1=rowSums(data[,2:4]), X2=rowSums(data[,5:7]))