t1 <- ptable(c("gender","answer"),list(c('male','female'),c('yes','no')), values=1:4)
t1 <- ptable(~gender+answer,list(c('male','female'),c('yes','no')), values=1:4)
t1 <- ptable(~gender+answer,c(2,2), values=1:4)
t2 <- ptable(c("answer","category"), list(c('yes','no'),c(1,2)), values=1:4+10)
t3 <- ptable(c("category","foo"), c(2,2), values=1:4+100)
varNames(t1)
nLevels(t1)
valueLabels(t1)
Run the code above in your browser using DataLab