burt | R Documentation |
matlogic returns for all variables a matrix of logical values for each levels. burt is defined as t(matlogic).matlogic
burt(x)
matlogic(x)
x |
A dataframe that contents only factors |
Antoine Lucas
color <- as.factor(c('blue','red','red','blue','red'))
size <- as.factor(c('large','large','small','medium','large'))
x <- data.frame(color,size)
matlogic(x)
## color.blue color.red size.large size.medium size.small
##1 1 0 1 0 0
##2 0 1 1 0 0
##3 0 1 0 0 1
##4 1 0 0 1 0
##5 0 1 1 0 0
burt(x)
## color.blue color.red size.large size.medium size.small
## color.blue 2 0 1 1 0
## color.red 0 3 2 0 1
## size.large 1 2 3 0 0
## size.medium 1 0 0 1 0
## size.small 0 1 0 0 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.