bsStat function

Summary of Basic Statistics

Summary of Basic Statistics

Calcluate basic statistics of data.

bsStat(y, two = NULL, digits = c(2, 2), use = 'complete.obs', na.rm = TRUE, ...)

Arguments

  • y: input data for summary statistics.
  • two: a logical value of whether to report the correlation and summary statistics separately; if NULL and the number of variables is less than 11, its value will be set to TRUE.
  • digits: digits for the output data, one for correlation coefficients and the other for mean and others; if a single scalar is supplied, it will be used for both.
  • use: an argument for correlation coefficient; see cor for detail.
  • na.rm: an argument for mean, sd, min, and max.
  • ...: additional arguments to be passed.

Details

Two set of summary statistics are generated. One is correlation coefficients and the other is mean, minimum, maximum, standard deviation, and number of observations. When two is unspecified and the number of variables is bigger than ten, the two sets are reported separately; otherwise, it is reported as a single data frame object.

Returns

A dataframe or list of the summary statistics.

Author(s)

Changyou Sun (edwinsun258@gmail.com )

Examples

data(daIns) (sum.daIns <- bsStat(y=daIns, digits=c(3,2)))
  • Maintainer: Changyou Sun
  • License: GPL (>= 2)
  • Last published: 2024-09-26

Useful links