scale_x_mergelist {ggupset} | R Documentation |
Merge list columns into character vectors
Description
The function handles list columns by collapsing them into delimited strings
using the sep
argument. This is useful to show sets and in combination
with the axis_combmatrix()
function.
Usage
scale_x_mergelist(sep = "-", ..., position = "bottom")
Arguments
sep |
String the is used to delimit the elements in each list entry. Default: "-". |
... |
additional arguments that are passed on to
|
position |
either "top" or "bottom" to specify where the x axis drawn. Default: "bottom" |
See Also
Examples
library(ggplot2)
ggplot(tidy_movies[1:100, ], aes(x=Genres)) +
geom_bar() +
scale_x_mergelist() +
theme(axis.text.x = element_text(angle = 90, hjust=1, vjust = 0.5))
ggplot(tidy_movies[1:100, ], aes(x=Genres)) +
geom_bar() +
scale_x_mergelist(sep = " & ", name = "Merged Movie Genres", position = "top") +
theme(axis.text.x = element_text(angle = 90, hjust=0, vjust = 0.5))
[Package ggupset version 0.4.0 Index]