Displaying 1 result from an estimated 1 matches for "studsur4".
Did you mean:
studserv
2008 Sep 27
2
reshape "Error in data[, timevar] : incorrect number of dimensions"
I have two waves of a survey given to students at various middle
schools and high schools, with student id numbers for each student. I
am having difficulty reshaping the file from long to wide.
My code is below:
library(foreign)
svy <- read.spss("studsur4.SAV")
svy.wide <- reshape(svy, timevar="WAVE", idvar="id", direction="wide")
"id" is the student identification number, and "WAVE" takes values 1
and 2. I get the following error:
Error in data[, timevar] : incorrect number of dimensio...