Displaying 1 result from an estimated 1 matches for "perus2".
Did you mean:
peruse
2010 Mar 25
1
Problem with reshaping data from wide to long format
Hi,
I have a data.frame in wide format which I would like to reshape into
a long format:
example (nonsense) data:
> dput(perus2)
structure(list(id = c(30L, 38L, 21L, 12L, 22L, 28L, 31L, 44L,
8L, 47L, 23L, 20L, 41L, 42L, 29L, 50L, 5L, 33L, 4L, 17L, 11L,
1L, 18L, 6L, 9L, 32L, 16L, 14L, 39L, 48L, 37L, 43L, 25L, 27L,
35L, 40L, 45L, 49L, 2L, 34L, 10L, 15L, 24L, 26L, 46L, 7L, 13L,
3L, 19L, 36L), height1 = c(157.10664436, 162.7788...