Hi all:

 

I solved the previous stated problem in something of a brute force way
(but it works). I seem to now be running into one little hiccup using
reshape. Here is a quick snip of the data in long format:

 

    grade stability year  schid

6  Grade 4         3 2001 100005

7  Grade 4         3 2002 100005

8  Grade 4         2 2003 100005

10 Grade 5         2 2001 100005

11 Grade 5         2 2002 100005

12 Grade 5         1 2003 100005

18 Grade 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             NA             NA

18 Grade 4 100010             NA             NA             NA

22 Grade 5 100010             NA             NA             NA

 

What appears to be the reason I get NAs in the newly created stability
columns?

 

Thank you

 

Harold


        [[alternative HTML version deleted]]

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to