Learn R Programming

AnalyzeTS (version 2.0)

Descriptives: Descriptives

Description

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

Usage

Descriptives(x, plot = FALSE, r = 2, answer = 1, statistic = "ALL")

Arguments

x
A continuously variable or a data frame contain continuously variables.
plot
Parameter 'Plot' are used by 2 form: Let plot=TRUE to paint description graph when x is time series. Let plot=list(a1,a2,...) (in a1,a2,...are descriptive statistic values as 'Mean', 'Max',...) to paint comparing graph between variables.
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)
statistic
A list contain descriptive statistic values that user want R print screen (default ALL).

Value

N
Length sample
NaN
Number NA values
Min
Min value
1sq QU
Value in 25% of interval probabilities
Median
Median value
Mean
Mean value
3rd QU
Value in 75% of interval probabilities
Max
Max value
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

Frequencies, Dgroup

Examples

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

#Calculate descriptive statistic to a continuously variable
Descriptives(crabs$FL)

#Calculate descriptive statistic to continuously variables
Descriptives(crabs)
Descriptives(crabs,answer=2)
Descriptives(crabs,answer=2,r=6)

#To just see some descriptive statistic variables
Descriptives(crabs,statistic=list("Min","Mean","Median","Max"))

#Combined paint graph to compare
Descriptives(crabs,plot=list("Mean","SD"))

#Descriptives for time series
Descriptives(lh,plot=TRUE)

Run the code above in your browser using DataLab