Description Usage Arguments Value Examples
Creates a quick visualization of the page layout
1 2 3 |
book |
Character or data.frame. Can either have each element be a separate line or having each element being separate words. |
lpp |
Numeric. Lines Per Page. Number of lines allocated for each page. |
character_height |
Numeric. Relative size of the height of each letter compared to its width. |
vertical_space |
Numeric. Distance between each lines vertically. |
x_space_pages |
Numeric. Distance between pages along the x-axis. |
y_space_pages |
Numeric. Distance between pages along the y-axis. |
nrow |
Numeric. Number of rows of pages, if omitted defaults to square layout. |
ncol |
Numeric. Number of columns of pages, if omitted defaults to square layout. |
bycol |
Logical. If TRUE (the default) the matrix is filled by columns, otherwise the matrix is filled by rows. |
A ggplot object with the given visualization.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(dplyr)
library(stringr)
library(ggplot2)
library(tidytext)
library(ggpage)
# quick
## data.frame with full lines
ggpage_quick(tinderbox)
## vector with full lines
ggpage_quick(tinderbox %>%
pull(text))
## data.frame with single words
ggpage_quick(tinderbox %>%
unnest_tokens(text, text))
## vector with single words
ggpage_quick(tinderbox %>%
unnest_tokens(text, text) %>%
pull(text))
# nrow and ncol
ggpage_quick(tinderbox, nrow = 2)
ggpage_quick(tinderbox, ncol = 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.