5
#Mary 4 0 0 0
A.K.
From: sylvain willart sylvain.will...@gmail.com
To: arun smartpink...@yahoo.com
Cc: R help r-help@r-project.org
Sent: Saturday, April 13, 2013 5:41 PM
Subject: Re: [R] Reshaping Data for bi-partite Network Analysis [SOLVED
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,4))
Input
people
, 2013 5:03 PM
Subject: [R] Reshaping Data for bi-partite Network Analysis
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
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
sylvain.will...@gmail.com
To: r-help r-help@r-project.org; sylvain willart
sylvain.will...@gmail.com
Sent: Saturday, April 13, 2013 5:03 PM
Subject: [R] Reshaping Data for bi-partite Network Analysis
Hello
I have a dataset of people spending time in places. But most people don't
hang out
5 matches
Mail list logo