| oii.freq | R Documentation |
This function prints a simple frequency table with totals and percentages
oii.freq(x)
x |
input variable, (usually of class |
A data.frame with one row per each unique value of x.
These values of x are assigned to the row.names of the data.frame.
The data.frame also has rows for:
Valid Total |
The total number of non-missing cases (i.e., |
Missing |
The total number of missing/NA cases (i.e., |
Total |
The total number of cases (i.e., |
The data.frame has the following columns:
freq |
The number of cases with this value |
percent |
The percentage of all cases that this value represents |
valid_percent |
The percentage of all valid (i.e., not missing) cases that this value represents |
cum_percent |
The cumulative percentage of valid cases |
data.frame, row.names
is.na, length, summary, table
#Create var as 200 A's, B's, and C's var<-sample(LETTERS[1:3],size=200,replace=TRUE) #Generate a frequency table for the counts of A's, B's, and C's oii.freq(var)