I am looking for the following simple question.
I have a data frame with names and numbers, divided in categories.
I would like to produce a text file with page breaks,
listing the names and numbers by category,
and totalling the numbers.

Example:

  Name<-LETTERS[1:6]
  Score<-rep(5:8,length.out=6)
  Form<-rep(1:2,each=3)
  x<-data.frame(Name,Score,Form)

This gives approximately what I need
  by(x,x$Form,function(x){x[,1:2]})
but I would like a total added to the list.

Gerrit.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to