summarize: Summarize numeric variables

View source: R/summarize.R

summarizeR Documentation

Summarize numeric variables

Description

Summarize numeric variables

Usage

summarize(
  x,
  varname,
  group_by = NULL,
  type = c("all", "median-range", "mean-sd"),
  na.rm = TRUE
)

Arguments

x

data.frame or data.table (will be coerced to data.table)

varname

Character, vector: Variable name(s) to summarize. Must be column names in x of type numeric.

group_by

Character, vector: Variable name(s) of factors to group by. Must be column names in x. Default = NULL

type

Character: "all", "median-range" or "mean-sd". Default = "all", which returns Mean, SD, Median, Range, NA (number of NA values)

na.rm

Logical: Passed to median and mean. Default = TRUE

Value

data.table with summary

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on Dec. 17, 2024, 6:16 p.m.