Displaying 1 result from an estimated 1 matches for "ivvalslist".
2013 Jan 17
0
help with error: DV "converted to a factor"
...defining IV vector as IVcat
IVcat<-IV
for(p in 1:length(IV)){
if((class(dataset[[toString(IV[p])]])=="character")|(class(dataset[[toString(IV[p])]])=="factor")){
IVcat[p]<-IV[p]
}
else{IVcat[p]<-""}
}
IVcat<-IVcat[!is.na(IVcat)]
#Create vectors (IVvalslist[n] for nth factor) for each IVcat containing
each possible value for that IV
IVvalslist<-vector('list', length(IVcat))
for(i in 1:length(IVcat)){
assign(paste("IVvalues",i,sep=""),unique(dataset[[toString(IVcat[i])]])[!is.na(unique(dataset[[toString(IVcat[i])]]))]...