Frequencies: Frequencies

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

Description

Calculating to return answer which are descriptive statistics values for a discrete variable or discrete variables in data frame.

Usage

1
Frequencies(x, plot = FALSE, r = 2, answer = 1)

Arguments

x

A discrete variable or a data frame contain discrete variable.

plot

Let plot=TRUE to paint pie graph.

r

Rounds the answer to the specified number of decimal places (default 2).

answer

Form of answers are returned. Let answer=1 or answer=2 (default 1)

Details

Statistic descriptive values are calculated by theory of base statistic.

Value

N

Length sample

NaN

Number NA values

xi

Length of xi

Note

You must not withdraw continuously variables from data frame. When you let a data frame in to this function which will auto withdraw continuously variables and calculate descriptive statistic to discrete variables.

Author(s)

Hong Viet Minh <hongvietminh@gmail.com>

References

Theory of base statistic.

See Also

Descriptives, Dgroup

Examples

1
2
3
4
5
6
7
8
9
#Loading data
library(MASS)
attach(quine)

#Descriptive for a discrete variable
Frequencies(Age,plot=TRUE)

#Descriptive for discrete more variables
Frequencies(quine,answer=2,plot=TRUE)

Example output

Loading required package: MASS
Loading required package: TSA

Attaching package: 'TSA'

The following objects are masked from 'package:stats':

    acf, arima

The following object is masked from 'package:utils':

    tar

Loading required package: TTR
Loading required package: tseries
Loading required package: urca

Attaching package: 'AnalyzeTS'

The following object is masked from 'package:base':

    pmax

        
N:   146
NaN:   0
F0:   27
F1:   46
F2:   40
F3:   33
$Eth
  N: NaN: A: N:
 146    0 69 77

$Sex
  N: NaN: F: M:
 146    0 80 66

$Age
  N: NaN: F0: F1: F2: F3:
 146    0  27  46  40  33

$Lrn
  N: NaN: AL: SL:
 146    0  83  63

AnalyzeTS documentation built on Dec. 9, 2019, 1:07 a.m.