Learn R Programming

poliscidata (version 2.3.0)

freqC: Generates table and figure describing distribution of variable values.

Description

Generates frequency distribution table and bar chart to describe distribution of variable values. Based on freq function in descr package.

Usage

freqC(x, w, plot = TRUE)

Arguments

x

A vector of variable values, should be in form dataset$var

w

Sample weights (optional), should be in form dataset$weighvar

plot

Do you want a bar chart? (default set to TRUE)

Value

A frequency distribution table (a "freqtable" and "matrix" class object)

Examples

Run this code
# NOT RUN {
   library(poliscidata)
   
   freqC(gss$zodiac, gss$wtss)
   
   freqC(x=gss$zodiac, w=gss$wtss)
# }

Run the code above in your browser using DataLab