Displaying 1 result from an estimated 1 matches for "tennshort".
Did you mean:
benshort
2004 Aug 06
1
reshape (was: Comparing rows in a dataframe)
...e 4 2 2001 100010
19 Grade 4 2 2002 100010
20 Grade 4 2 2003 100010
22 Grade 5 2 2001 100010
Now, I want to reshape this into the wide format. However, when I do I
get NAs in the stability columns. Here is what I have done and the
result.
wide<- reshape(tennshort, idvar = c("schid","grade"), timevar = "year",
v.names="stability", direction="wide")
grade schid stability.2001 stability.2002 stability.2003
6 Grade 4 100005 NA NA NA
10 Grade 5 100005 NA...