powered by
Takes in variable and finds mode, works with sampling weights
wtd.mode(x, weights = NULL)
A variable
Sampling weights of variable (optional)
Returns the modal value of the variable
Makes use of the freq function, part of the descr package
# NOT RUN { library(poliscidata) wtd.mode(gss$zodiac, gss$wtss) # }
Run the code above in your browser using DataLab