# 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: [
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(
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
Hi Friends,
I'm new to R.I have a data frame :
xxx having columns colorname values
R XXX 10
G YYY 4
4 matches
Mail list logo