testdat.df<-data.frame(Sex=sample(c("Male","Female"),142,TRUE),
Marital=sample(c("Divorced","Married","Single","De facto","Widowed"),142,TRUE),
SES=c(sample(c("Low","Middle","High"),130,TRUE),rep(NA,12)),
Age=sample(c("0-20","21-40","41-60","61-80","over 80"),142,TRUE))
testdat.freq<-freq(testdat.df)
plot.freq(testdat.freq,show.labels=TRUE,show.axis=TRUE)
Run the code above in your browser using DataLab