Dear R´ers,


How can I create one single factor variable from two variables incorporating all possible combinations of the values??


test<-sample(c("A",NA,"B"),100,replace=T)
test2<-sample(c("E",F,"A"),100,replace=T)


tes<-cbind(test,test2)


pseduocode:

r<-function(test,test2)

r

AE
AF
AA
NAE
NAF
NAA
BE
BF
BA


//M




	[[alternative HTML version deleted]]

