I want to make a table of mean values, standard deviation, max and min for a data frame, until know I've achieved this table with this code.
dt<-data.frame(nuevabase$años_de_educacion,group=factor(nuevabase$año))
abs<-ddply(dt,~ group,summarise,mean=mean(nuevabase$años_de_educacion,na.rm=TRUE)
,sd=sd(nuevabase$años_de_educacion,na.rm=TRUE)
,max=max(nuevabase$años_de_educacion,na.rm=TRUE)
,min=min(nuevabase$años_de_educacion,na.rm=TRUE))
but the problem is that the table gives me the mean value of the whole years, and I only want a mean value for each year, how I can change this?