[R] Column naming mystery

Werner Wernersen pensterfuzzer at yahoo.de
Mon Aug 27 15:21:10 CEST 2007


Sorry that the problem description was not sufficient.
Here is a self-contained code replicating the problem:

require(doBy)
x <-
as.data.frame(matrix(ncol=3,seq(1,12),dimnames=list(c(),c("hh","total","total.inf"))))
summaryBy(total+total.inf~hh,x,FUN=sum)

What surprises me are the zeros in the resulting
total.sum column. The problem remains if total.inf is
renamed to totalinf or total_inf but not if renamed to
ttotal.inf .

Can anyone explain to me what the rules for naming
columns are so that I can avoid such mistakes in the
future?

Thanks a lot!


      ________



More information about the R-help mailing list