ggpage_quick {ggpage}R Documentation

Creates a quick visualization of the page layout

Description

Creates a quick visualization of the page layout

Usage

ggpage_quick(book, lpp = 25, character_height = 3,
  vertical_space = 1, x_space_pages = 10, y_space_pages = 10,
  nrow = NULL, ncol = NULL, bycol = TRUE)

Arguments

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.

Value

A ggplot object with the given visualization.

Examples


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)


[Package ggpage version 0.2.3 Index]