nrow_paragraph: Calculate Number of Rows for a Paragraph

Description Usage Arguments Value Specification Examples

View source: R/rtf_nrow.R

Description

Calculate number of rows for a paragraph like title, subline, footnote, source

Usage

1
nrow_paragraph(tbl, size, padding = 0.2)

Arguments

tbl

A data frame's rtf_title, rtf_subline, rtf_footnote, or rtf_source attribute containing strwidth attribute

size

Size of a line in inches

padding

Cell padding in inches

Value

an integer (number of rows) for title, subline, footnote, or source

Specification

The contents of this section are shown in PDF user manual only.

Examples

1
2
3
4
5
6
7
8
library(dplyr) # required for running example
tb <- head(iris) %>%
  rtf_title(title = "Iris example") %>%
  rtf_footnote(footnote = c("footnote 1", "footnote 2")) %>%
  rtf_body()

r2rtf:::nrow_paragraph(attr(tb, "rtf_title"), 6.25)
r2rtf:::nrow_paragraph(attr(tb, "rtf_footnote"), 6.25)

r2rtf documentation built on Sept. 10, 2021, 1:06 a.m.