print.freq: Display frequency table(s)

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Displays one or more frequency tables produced by freq.

Usage

1
2
 ## S3 method for class 'freq'
print(x,show.pc=TRUE,cum.pc=FALSE,show.total=FALSE,...)

Arguments

x

a frequency table produced by \link{freq}

show.pc

Whether to display percentages as well as counts.

cum.pc

Whether to display cumulative percentages.

show.total

Whether to display the total count of observations.

...

additional arguments passed to print.

Details

print.freq displays frequency tables produced by freq. If show.pc is TRUE and there is a value in the frequency table with the label "NA", an additional set of percentages ignoring that value will also be displayed. If show.total is TRUE, the total number of observations will be displayed.

Value

nil

Author(s)

Jim Lemon

See Also

freq

Examples

1
2
3
 test.df<-data.frame(A=c(sample(1:10,99,TRUE),NA),C=sample(LETTERS,100,TRUE))
 test.freq<-freq(test.df)
 print(test.freq,show.total=TRUE)

Example output

Frequencies for A 
        8    2    7    1    9    4    5   10    3    6   NATotal
       13   12   12   11   11   10   10    8    7    5    1 100
%      13   12   12   11   11   10   10    8    7    5    1 
%!NA 13.1 12.1 12.1 11.1 11.1 10.1 10.1  8.1  7.1  5.1 


Frequencies for C 
        Z    F    O    K    P    W    A    M    Y    B    C    D    L    S    U    X    H    N    G    I    J    R    E    Q    V   NATotal
        8    7    7    6    6    6    5    5    5    4    4    4    4    4    4    4    3    3    2    2    2    2    1    1    1    0 100
%       8    7    7    6    6    6    5    5    5    4    4    4    4    4    4    4    3    3    2    2    2    2    1    1    1    0 
%!NA    8    7    7    6    6    6    5    5    5    4    4    4    4    4    4    4    3    3    2    2    2    2    1    1    1 

prettyR documentation built on May 2, 2019, 2:16 a.m.

Related to print.freq in prettyR...