I\'m writting my first program in R and as a newbie I\'m having some troubles, hope you can help me.
I\'ve got a data frame like this:
> v1<-c
You need to tell the aggregate function to use sum, as the default is for it to get the mean of each category. For example:
aggregate(datos[,c("a1","a2","a3")], by=list(datos$Position), "sum")