[R] RES: another aov results interpretation question

From: Paulo Brando <pmbrando_at_ipam.org.br>
Date: Mon 20 Jun 2005 - 14:46:15 EST

Dear All,

I created a script to calculate averages - two groups: "parcel" and "date" - and, based on these averages, make a graph. The problem is that 'R' does not recognize the first column even if I try to insert one.

A brief example

Raw data:

Data <- sample(1:100, 30, replace = FALSE, prob = NULL) Date <- rep(c("02/30/2004","03/15/2004", "04/16/2004", "06/14/2004", "07/08/2004"), 6)
Parcel <- rep(c("DRY", "CONTROL"),15)

Df <- data.frame(Parcel, Date, Data)

Res <- tapply(Df$Data, list(Date = Df$Date, Parcel = Df$Parcel), mean)

> Res

            Parcel
Date          CONTROL      DRY
  02/30/2004 53.00000 52.33333
  03/15/2004 54.00000 67.66667
  04/16/2004 54.66667 30.00000

  06/14/2004 27.66667 20.00000
  07/08/2004 59.00000 38.00000

> colnames(Res)

[1] "CONTROL" "DRY"
> matplot(Res[,1], Res[,-1], type = "l")

### It does not recognize the colunm "Date". Why?

Thanks in advance!

Paulo



Paulo M. Brando
Instituto de Pesquisa Ambiental da Amazonia (IPAM) Santarem, PA, Brasil.
Av. Rui Barbosa, 136.
Fone: + 55 93 522 55 38
www.ipam.org.br
E-mail: pmbrando@ipam.org.br

R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Jun 21 00:07:56 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:54 EST