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_quantile(x)
## results from 'draws_quantile'
## assigned to a data frame
library(dplyr)
df <- data.frame(x)
## base R approach
cbind(df, draws_quantile(x))
## a tidyverse alternative:
## mutate with no '='
df |>
mutate(draws_quantile(x))
Run the code above in your browser using DataLab