SOURCEBOOK

R | Data Analysis

Frequencies

Prior to the steps below, enter the data as appropriate for the analyses (described elsewhere).

Obtaining a Frequency Distribution

Get the frequency distribution for the variable.

FrequencyTable <- table(Outcome)
FrequencyTable
prop.table(FrequencyTable)

Obtaining Summary Statistics

Get the percentiles for the variable.

length(Outcome)
summary(Outcome)