frequencies: Frequency Tables

Description Usage Arguments Value See Also Examples

View source: R/frequencies.R

Description

Creates a set of frequency tables.

Usage

1
frequencies(data,r.digits=1)

Arguments

data

A data.frame containing the variables on which to run frequencies

r.digits

how many digits should the percentages be rounded to

Value

Returns a list of freq.table objects. One for each variable in data.

See Also

table xtabs descriptive.table prop.table

Examples

1
2
3
4
5
dat<-data.frame(rnorm(100)>0,trunc(runif(100,0,5)))
##rounding to 1
frequencies(dat)
##rounding to 4
frequencies(dat,4)

Example output

Loading required package: ggplot2
Loading required package: JGR
Loading required package: rJava
Loading required package: JavaGD
OpenJDK 64-Bit Server VM warning: Can't detect primordial thread stack location - find_vma failed

Please type JGR() to launch console. Platform specific launchers (.exe and .app) can also be obtained at http://www.rforge.net/JGR/files/.


Loading required package: car
Loading required package: carData
Loading required package: MASS
Registered S3 methods overwritten by 'lme4':
  method                          from
  cooks.distance.influence.merMod car 
  influence.merMod                car 
  dfbeta.influence.merMod         car 
  dfbetas.influence.merMod        car 


Note Non-JGR console detected:
	Deducer is best used from within JGR (http://jgr.markushelbig.org/).
	To Bring up GUI dialogs, type deducer().

$rnorm.100....0
------------------------------------------------------------
--                        Frequencies                     --
--                                                        --
  Value # of Cases       % Cumulative %
1 FALSE         56      56           56
2  TRUE         44      44          100
--                                                        --
--                        Case Summary                    --
--                                                        --
           Valid Missing Total
# of cases   100       0   100
--                                                        --
--                                                        --
------------------------------------------------------------






$trunc.runif.100..0..5..
------------------------------------------------------------
--                        Frequencies                     --
--                                                        --
  Value # of Cases       % Cumulative %
1     0         19      19           19
2     1         26      26           45
3     2         19      19           64
4     3         18      18           82
5     4         18      18          100
--                                                        --
--                        Case Summary                    --
--                                                        --
           Valid Missing Total
# of cases   100       0   100
--                                                        --
--                                                        --
------------------------------------------------------------






$rnorm.100....0
------------------------------------------------------------
--                        Frequencies                     --
--                                                        --
  Value # of Cases       % Cumulative %
1 FALSE         56      56           56
2  TRUE         44      44          100
--                                                        --
--                        Case Summary                    --
--                                                        --
           Valid Missing Total
# of cases   100       0   100
--                                                        --
--                                                        --
------------------------------------------------------------






$trunc.runif.100..0..5..
------------------------------------------------------------
--                        Frequencies                     --
--                                                        --
  Value # of Cases       % Cumulative %
1     0         19      19           19
2     1         26      26           45
3     2         19      19           64
4     3         18      18           82
5     4         18      18          100
--                                                        --
--                        Case Summary                    --
--                                                        --
           Valid Missing Total
# of cases   100       0   100
--                                                        --
--                                                        --
------------------------------------------------------------

Deducer documentation built on May 2, 2019, 8:35 a.m.

Related to frequencies in Deducer...