File: chunk_dataframe.Rd

package info (click to toggle)
r-cran-flextable 0.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,264 kB
  • sloc: sh: 15; makefile: 2
file content (83 lines) | stat: -rw-r--r-- 2,339 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/05_content.R
\name{chunk_dataframe}
\alias{chunk_dataframe}
\title{create a chunk representation suitable for flextable}
\usage{
chunk_dataframe(...)
}
\arguments{
\item{...}{values to set.}
}
\value{
a data.frame with an additional class "chunk" that makes it
suitable for beeing used in \code{\link[=as_paragraph]{as_paragraph()}}
}
\description{
This function is to be used by external packages
that want to provide an object that can be inserted as a chunk
object in paragraphs of a flextable object.
}
\section{text pattern with default values}{


\if{html}{\out{<div class="sourceCode">}}\preformatted{chunk_dataframe(txt = c("any text", "other text"))
}\if{html}{\out{</div>}}
}

\section{text pattern with bold set to TRUE}{


\if{html}{\out{<div class="sourceCode">}}\preformatted{chunk_dataframe(
  txt = c("any text", "other text"),
  bold = c(TRUE, TRUE))
}\if{html}{\out{</div>}}
}

\section{text pattern with control over all formatting properties}{


\if{html}{\out{<div class="sourceCode">}}\preformatted{chunk_dataframe(
  txt = c("any text", "other text"),
  font.size = c(12, 10),
  italic = c(FALSE, TRUE),
  bold = c(FALSE, TRUE),
  underlined = c(FALSE, TRUE),
  color = c("black", "red"),
  shading.color = c("transparent", "yellow"),
  font.family = c("Arial", "Arial"),
  hansi.family = c("Arial", "Arial"),
  eastasia.family = c("Arial", "Arial"),
  cs.family = c("Arial", "Arial"),
  vertical.align = c("top", "bottom") )
}\if{html}{\out{</div>}}
}

\section{text with url pattern}{


\if{html}{\out{<div class="sourceCode">}}\preformatted{chunk_dataframe(
  txt = c("any text", "other text"),
  url = rep("https://www.google.fr", 2),
  font.size = c(12, 10),
  italic = c(FALSE, TRUE),
  bold = c(FALSE, TRUE),
  underlined = c(FALSE, TRUE),
  color = c("black", "red"),
  shading.color = c("transparent", "yellow"),
  font.family = c("Arial", "Arial"),
  hansi.family = c("Arial", "Arial"),
  eastasia.family = c("Arial", "Arial"),
  cs.family = c("Arial", "Arial"),
  vertical.align = c("top", "bottom") )
}\if{html}{\out{</div>}}
}

\section{images pattern}{


\if{html}{\out{<div class="sourceCode">}}\preformatted{chunk_dataframe(width = width, height = height, img_data = files )
}\if{html}{\out{</div>}}
}

\keyword{internal}