Calculate number of rows for a paragraph like title, subline, footnote, source
Arguments
- tbl
A data frame's
rtf_title
,rtf_subline
,rtf_footnote
, orrtf_source
attribute containingstrwidth
attribute- size
Size of a line in inches
- padding
Cell padding in inches
Examples
library(dplyr) # required for running example
#>
#> Attaching package: ‘dplyr’
#> The following objects are masked from ‘package:stats’:
#>
#> filter, lag
#> The following objects are masked from ‘package:base’:
#>
#> intersect, setdiff, setequal, union
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)
#> [1] 1
r2rtf:::nrow_paragraph(attr(tb, "rtf_footnote"), 6.25)
#> [1] 2