describe(x, digits = 2, na.rm = TRUE, skew = TRUE, ranges = TRUE)
summary
and hmisc::describe do so. The describe function in the psych
package is meant to produce the most frequently requested stats in psychometric and psychology studies, and to produce them in an easy to read data.frame. The results from describe can be used in graphics functions (e.g., error.crosses
).The range statistics (min, max, range) are most useful for data checking to detect coding errors, and should be found in early analyses of the data.
Although describe will work on data frames as well as matrices, it is important to realize that for data frames, descriptive statistics will be reported only for those variables where this makes sense (i.e., not for factors or for alphanumeric data).
In a typical study, one might read the data in from the clipboard (read.clipboard
), show the splom plot of the correlations (pairs.panels
), and then describe the data.
describe.by
, skew
, kurtosi
, pairs.panels
, read.clipboard
, error.crosses
describe(attitude)
describe(attitude,skew=FALSE) #attitude is taken from R data sets
Run the code above in your browser using DataLab