Learn R Programming

AnalyzeTS (version 2.0)

Frequencies: Frequencies

Description

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

Usage

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)

Value

N
Length sample
NaN
Number NA values
(xi)N
Length of xi
VAR
Variance value
SD
Standard Deviation
SE
Standard Deviation of the Estimated Means

Details

Statistic descriptive values are calculated by theory of base statistic.

References

Theory of base statistic.

See Also

Descriptives, Dgroup

Examples

Run this code
#Load data
library(MASS)
data(crabs)

#Descriptive for a discrete variable
Frequencies(crabs$sp,plot=TRUE)

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

Run the code above in your browser using DataLab