|
|
Hello,
Try
df1 <- read.table(text="
County 1990 1991 1992 1993
Alachua 1 1 1 1
Baker 0 0 0 0
Bay 0 0 1 0
Bradford 0 0 0 0
", header=TRUE)
df1$Total <- rowSums(df1[ , -1]) # Not column 1
df1$Total <- rowSums(df1[ , 2:5])# Explicit column numbers
Hope this helps,
Rui Barradas
|