Displaying 1 result from an estimated 1 matches for "responsedata2".
Did you mean:
responsedata
2009 Apr 29
1
R Macro Question
Dear all,
I am a new R user, and I have a question about R macro.
Here is the situation, I want to do item option analysis (options include: A
, B, C, D), below is the codes for option A analyses.
#option A analyses
optiona<-mat.or.vec(nrow(responsedata2), ncol(responsedata2))
# create A matrix by recoding
for (i in 1:ncol(responsedata2)){
optiona[,i]<-recode(responsedata2[,i],"'A'=1;NA=NA;else=0")
}
# compute mean for A matrix
pa<-rep(0,ncol(optiona))
for (i in 1:ncol(optiona)){
pa[i]<-round(mean(optiona[,i],n...