R: Give simple descriptive statistics for a matrix or a data...
describe
R Documentation
Give simple descriptive statistics for a matrix or a data frame
Description
This function is designed to emulate the Minitab function
DESCRIBE. It gives simple descriptive statistics for a data frame
Usage
describe(x, varNames = NULL)
Arguments
x
A matrix or data.frame with numeric entries. Different
variables are represented by columns.
varNames
A vector of variable names for each of the columns
Value
A data.frame containing the following elements:
N
The number of observations for each variable
mean
The sample mean for each variable
stdev
The sample standard deviation
sterr
The standard error of the mean
min
The minimum
q1
The lower quartile
med
The median
q3
The upper quartile
max
The maximum
Examples
data(poissonTest.df)
describe(poissonTest.df)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Bolstad2)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Bolstad2/describe.Rd_%03d_medium.png", width=480, height=480)
> ### Name: describe
> ### Title: Give simple descriptive statistics for a matrix or a data frame
> ### Aliases: describe
>
> ### ** Examples
>
> data(poissonTest.df)
> describe(poissonTest.df)
N mean stdev sterr min q1
x 100 1.308488e-01 8.850879e-01 8.850879e-02 -2.340585e+00 -0.41225937
eps 100 6.588806e-03 9.651264e-02 9.651264e-03 -1.816151e-01 -0.06713503
log.lam 100 1.660833e+00 4.429345e+00 4.429345e-01 -1.088454e+01 -1.17576279
lam 100 1.821149e+03 1.001592e+04 1.001592e+03 1.874584e-05 0.30880134
y 100 1.819610e+03 1.001553e+04 1.001553e+03 0.000000e+00 0.00000000
med q3 max
x 0.178115813 0.73628656 2.116507e+00
eps 0.004193399 0.07456499 2.715079e-01
log.lam 1.874461533 4.59006387 1.147421e+01
lam 6.517455763 98.61346806 9.620220e+04
y 7.000000000 92.50000000 9.622100e+04
>
>
>
>
>
> dev.off()
null device
1
>