search for: q1before

Displaying 1 result from an estimated 1 matches for "q1before".

Did you mean: 1before
2013 May 01
1
Combine multiple tables into one
...squ <- matrix(rep(0,length(obs)^2),ncol=length(obs)) ?? > for(i in 1:length(obs)){ ? ? >? ? for(j in 1:length(obs)){ ? >? ? ? ? ? squ[i,j] <- sum((a==obs[i])*(b==obs[j]), na.rm=TRUE) ? >? ? ? } ? >? } ? >? squ >} > >#Mock data >sampleid <- c(1:5) >Q1before <- c(0,0,1,0,1) >Q1after <- c(0,1,0,0,1) >Q2before <- c(1,0,0,0,0) >Q2after <- c(0,0,0,0,0) > >#This is what my real data looks like >#It may be easier to reformat this df to a format that could then use my create.table() function to get to the combined table end...