|
Descriptive Statistics
There are many functions in R that can provide descriptive statistics. A few of the more common options are shown below. Summary Function
The summary function provides the Min, 1stQuar, Median, Mean, 3rdQuar, and Max values. summary(ElementName) Example: > summary(pressure) Describe Function
The describe function provides the total n, number of missing values, number of unique values, mean, 5th, 10th, 25th, 50th, 75th, 90th, and 95th percentiles, and the frequency of each value. install.packages ("Hmisc") library (Hmisc) describe (ElementName) Example: > install.packages ("Hmisc") > library (Hmisc) > describe (pressure) Stat.Desc Function
The stat.desc function provides the total n, number of null values, number of na values, min, max, range, sum, median, mean, SE of the mean, 95% CI of the mean, var, standard deviation, and coeff of var. install.packages ("pastecs") library (pastecs) stat.desc (ElementName) Example: > install.packages ("pastecs") > library (pastecs) > stat.desc (pressure) |