summary_table: Create a grouped summary table

Description Usage Arguments Examples

View source: R/summary_table.R

Description

Create a grouped summary table

Usage

1

Arguments

x

(numeric) Vector with numbers

y

(factor) Vector with factor levels

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
set.seed(1)
x <- sample(1:100, 50, replace = TRUE)
y <- as.factor(sample(c("Drug", "Placebo", "no treament"), 50, replace = TRUE))

summary_table(x, y)

set.seed(1)
x <- c(
  rnorm(50, 115, sd = 25),
  rnorm(50, 198, sd = 65),
  sample(rnorm(50, 195, sd = 45), 50, TRUE)
)

y <- as.factor(c(
 rep("Drug", 50),
 rep("Placebo", 50),
 rep("no treatment", 50)
))

summary_table(x, y)

zappingseb/userRMUC2020 documentation built on June 17, 2020, 12:34 a.m.