put)
# place
#people school home sport beach
# Marc 2 4 0 0
#Joe 0 3 1 5
#Mary 4 0 0 0
A.K.
From: sylvain willart
To: arun
Cc: R help
Sent: Saturday, April 13, 2013 5:41 PM
Subject: Re: [R] Reshaping Data for
0
>
> A.K.
>
>
>
>
> From: sylvain willart
> To: r-help ; sylvain willart <
> sylvain.will...@gmail.com>
> Sent: Saturday, April 13, 2013 5:03 PM
> Subject: [R] Reshaping Data for bi-partite Network Analysis
>
>
> He
Hello,
With the following the order of both rows and columns will be different
than the order of your example output, but the table is basically the same.
xtabs(time ~ people + place, data = Input)
Hope this helps,
Rui Barradas
Em 13-04-2013 22:03, sylvain willart escreveu:
Hello
I have
eople beach home school sport
# Joe 5 3 0 1
# Marc 0 4 2 0
# Mary 0 0 4 0
A.K.
From: sylvain willart
To: r-help ; sylvain willart
Sent: Saturday, April 13, 2013 5:03 PM
Subject: [R] Reshaping Data for bi
Hello
I have a dataset of people spending time in places. But most people don't
hang out in all the places.
it looks like:
> Input<-data.frame(people=c("Marc","Marc","Joe","Joe","Joe","Mary"),
+ place=c("school","home","home","sport","beach","school"),
+ time=c(2,4,3,1,
5 matches
Mail list logo