Re: [R] creating Pivot

2012-07-25 Thread John Kane
# note file name is xx. library(reshape2) dcast(xx, name ~ color, value.var = "values") John Kane Kingston ON Canada > -Original Message- > From: saileshchowd...@gmail.com > Sent: Tue, 24 Jul 2012 21:41:19 -0700 (PDT) > To: r-help@r-project.org > Subject: [

Re: [R] creating Pivot

2012-07-25 Thread Rui Barradas
Hello, Try the following. dat <- read.table(text=" colorname values R XXX 10 G YYY 4 Y ZZZ 5 G XXX 2 Y XXX 3 R YYY 2 Y YYY 1 R ZZZ 2 G ZZZ 3 ", header=TRUE) d xtabs(

Re: [R] creating Pivot

2012-07-25 Thread Jim Lemon
On 07/25/2012 02:41 PM, namit wrote: Hi Friends, I'm new to R.I have a data frame : xxx having columns colorname values R XXX 10 G YYY 4

[R] creating Pivot

2012-07-25 Thread namit
Hi Friends, I'm new to R.I have a data frame : xxx having columns colorname values R XXX 10 G YYY 4