| mr_recode | R Documentation |
Relabel some or all of the levels of a multiple-response object. Two levels that are recoded to the same value will be combined.
mr_recode(x, ...)
x |
Object of class |
... |
new names in the form |
New object of class mr, ms
data(nzbirds)
nzbirds<-as.mr(nzbirds)
nzbirds
## recode to English names
mr_recode(nzbirds,morepork="ruru",stilt="kaki",waxeye="tauhou")
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.