set.seed(0)
m <- rbind(a = rnorm(100, mean = 5, sd = 2),
b = rnorm(100, mean = -3, sd = 3),
c = rnorm(100, mean = 0, sd = 20))
x <- rvec(m)
x
draws_ci(x)
draws_ci(x, width = c(0.5, 0.99))
draws_ci(x, prefix = "results")
## results from 'draws_ci'
## assigned to a data frame
library(dplyr)
df <- data.frame(x)
## base R approach
cbind(df, draws_ci(x))
## a tidyverse alternative:
## mutate with no '='
df |> mutate(draws_ci(x))
Run the code above in your browser using DataLab