View source: R/pivot_quantiles.R
pivot_quantiles_longer | R Documentation |
dist_quantile
longerSelected columns that contain dist_quantiles
will be "lengthened" with
the quantile levels serving as 1 column and the values as another. If
multiple columns are selected, these will be prefixed with the column name.
pivot_quantiles_longer(.data, ..., .ignore_length_check = FALSE)
.data |
A data frame, or a data frame extension such as a tibble or epi_df. |
... |
< |
.ignore_length_check |
If multiple columns are selected, as long as
each row has contains the same number of quantiles, the result will be
reasonable. But if, for example, |
An object of the same class as .data
.
d1 <- c(dist_quantiles(1:3, 1:3 / 4), dist_quantiles(2:4, 1:3 / 4))
d2 <- c(dist_quantiles(2:4, 2:4 / 5), dist_quantiles(3:5, 2:4 / 5))
tib <- tibble(g = c("a", "b"), d1 = d1, d2 = d2)
pivot_quantiles_longer(tib, "d1")
pivot_quantiles_longer(tib, dplyr::ends_with("1"))
pivot_quantiles_longer(tib, d1, d2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.