data(ethnicity)
ethnicity
mr_stack(ethnicity)
data(nzbirds)
nzbirds
ms_stack(nzbirds)
## not actually a sensible use
d <- mr_stack(ethnicity, nzbirds)
head(d)
with(d, table(ethnicity, nzbirds))
## equivalent, but more efficient
mtable(mr_na(ethnicity), mr_na(nzbirds))
Run the code above in your browser using DataLab