Gives count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).

run_summarySE(
  data,
  measurevar,
  groupvars = NULL,
  na.rm = FALSE,
  conf.interval = 0.95,
  .drop = TRUE
)

Arguments

data

(Required). a data frame.

measurevar

(Required). character. the name of a column that contains the variable to be summariezed.

groupvars

(Required). vector. a vector containing names of columns that contain grouping variables.

na.rm

(Required). logical. a boolean that indicates whether to ignore NA's (default: FALSE).

conf.interval

(Required). numeric. the percent range of the confidence interval (default: 0.95).

.drop

(Required). logical. should combinations of variables that do not appear in the input data be preserved (FALSE) or dropped (default: TRUE).

Value

a data frame with count, mean, standard deviation, standard error of the mean, and confidence interval (default 95%).

References

https://github.com/cran/Rmisc/

Author

Created by Hua Zou (5/19/2022 Shenzhen China)

Examples


if (FALSE) {
library(dose)
run_summarySE(ToothGrowth, measurevar="len", groupvars=c("supp", "dose"))
}