hyperlink_text | R Documentation |
The function lets add hyperlinks within flextable objects.
It is used to add it to the content of a cell of the
flextable with the functions compose()
, append_chunks()
or prepend_chunks()
.
URL are not encoded, they are preserved 'as is'.
hyperlink_text(x, props = NULL, formatter = format_fun, url, ...)
x |
text or any element that can be formatted as text
with function provided in argument |
props |
an |
formatter |
a function that will format x as a character vector. |
url |
url to be used |
... |
additional arguments for |
This chunk option requires package officedown in a R Markdown context with Word output format.
compose()
Other chunk elements for paragraph:
as_b()
,
as_bracket()
,
as_chunk()
,
as_equation()
,
as_highlight()
,
as_i()
,
as_image()
,
as_sub()
,
as_sup()
,
as_word_field()
,
colorize()
,
gg_chunk()
,
grid_chunk()
,
linerange()
,
lollipop()
,
minibar()
,
plot_chunk()
dat <- data.frame(
col = "Google it",
href = "https://www.google.fr/search?source=hp&q=flextable+R+package",
stringsAsFactors = FALSE
)
ftab <- flextable(dat)
ftab <- compose(
x = ftab, j = "col",
value = as_paragraph(
"This is a link: ",
hyperlink_text(x = col, url = href)
)
)
ftab
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.