mr_union | R Documentation |
These functions take union, intersection, and difference of two multiple-response objects. An observation has a level in the union if it has that level in either input. It has the level in the intersection if it has the level in both inputs. It has the level in the difference if it has the level in x
and not in y
mr_union(x, y,...) mr_intersect(x, y,...) mr_diff(x, y,...)
x,y |
Objects of class |
... |
not used |
Object of class mr
data(usethnicity) race<-as.mr(usethnicity$Q5,"") race<-mr_drop(race,c(" ","F","G","H")) race <- mr_recode(race, AmIndian="A",Asian="B", Black="C", Pacific="D", White="E") mtable(race) hispanic<-as.mr(usethnicity$Q4==1, "Hispanic") ethnicity<-mr_union(race, hispanic) mtable(ethnicity) ethnicity[101:120]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.