SOURCEBOOK

R | Data Analysis

Frequencies

Prior to the steps below, enter the data as appropriate for the analyses (described elsewhere). As always, the following commands should be typed directly in the R console window.

Obtaining Frequencies

Get the frequency distribution for the variable.

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

Obtaining Descriptive Statistics

Get the percentiles for the variable.

length(Outcome)
summary(Outcome)