summary_stats: A Simple Custom-defined Summary Stats Function for a single...

Description Usage Arguments Value Examples

View source: R/summaryStats.R

Description

A Simple Custom-defined Summary Stats Function for a single variable It works with data.frame, data.table and tibble.

Usage

1
summary_stats(data, target_var, decimals = 2)

Arguments

data

A data frame

target_var

A character representing the outcome variable

decimals

Number of decimals in the output frame

Value

A data frame with min, mean, median, sd, max

Examples

1
2
3
4
5
6
7
8
library(rlang)
library(dplyr)
library(purrr)
library(glue)
library(summaryStatsR)
library(datasets)

summary_stats(datasets::iris, "Sepal.Length", decimals = 2)

bigpas/summaryStatsR documentation built on Dec. 1, 2019, 6:33 p.m.