dear all,
apologizes for bothering with a probably stupid question but I really don' t know how to proceed.

I have a dataset which look like df

a <- c(1,2,3,4,4,4,5,5)
b <- c(11,7,4,9,8,3,12,4)
df <-cbind(a,b)

I would like to have one which looks like this:

a
1 11
2 7
3 4
4 9 8 3
5 12 4

a are vertex of a network, b the edges. In the data the lenght of a is about 50000

I read several posts about reshape, reshape2, split, ldply but I couldn't manage to do it. The problem seems to be that the is not a real panel.

Any help would be really appreciated,
my best regards
Marco

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to