Re: [R] table with 3 varialbes

2009-02-19 Thread patricia garcía gonzález
Hi, I think you should take a look to ?reshape. Regards Patricia > Date: Thu, 19 Feb 2009 11:02:58 +0100 > From: pcando...@gmail.com > To: r-help@r-project.org > Subject: [R] table with 3 varialbes > > I have the initial matrice: > > > *data.frame(Subject=rep(10

Re: [R] table with 3 varialbes

2009-02-19 Thread patricia garcía gonzález
Hi, Look, is simple with reshape: x <- data frame(...) reshape( x, idvar = "Subject", direction = "wide", timevar = "Quarter") Regards, Patricia > Date: Thu, 19 Feb 2009 11:02:58 +0100 > From: pcando...@gmail.com > To: r-help@r-project.org &g

[R] table with 3 varialbes

2009-02-19 Thread Pascal Candolfi
I have the initial matrice: > *data.frame(Subject=rep(100:101, each=4), Quarter=rep(paste("Q",1:4, sep=""),2), Boolean = rep(c("Y","N"),4))* Subject Quarter Boolean 1100 Q1 Y 2100 Q2 N 3100 Q3 Y 4100 Q4 N 5101 Q1 Y 61