| indentation | R Documentation |
Change the first-line or hanging indent of paragraphs in selected rows and columns of a flextable.
A first-line indent moves only the first line of the paragraph to the
right. A hanging indent moves all lines but the first one to the
right; the indented lines start at the paragraph left padding plus the
hanging value, so hanging should not exceed the left padding
(see padding()).
indentation(
x,
i = NULL,
j = NULL,
first_line = NULL,
hanging = NULL,
part = "body"
)
x |
a 'flextable' object, see flextable-package to learn how to create 'flextable' object. |
i |
row selector, see section Row selection with the |
j |
column selector, see section Column selection with the |
first_line |
first-line indent in pts (points). Use NA to unset. |
hanging |
hanging indent in pts (points). Use NA to unset. If both
|
part |
part selector, see section Part selection with the |
Other formatting shortcuts:
align(),
bg(),
bold(),
color(),
empty_blanks(),
font(),
fontsize(),
highlight(),
italic(),
keep_with_next(),
line_spacing(),
padding(),
rotate(),
style(),
tab_settings(),
valign()
ft_1 <- flextable(head(iris))
ft_1 <- mk_par(
x = ft_1, i = 1, j = 1, part = "header",
value = as_paragraph("A rather long header that will wrap on two lines")
)
ft_1 <- padding(ft_1, i = 1, j = 1, padding.left = 30, part = "header")
ft_1 <- indentation(ft_1, i = 1, j = 1, hanging = 20, part = "header")
ft_1 <- width(ft_1, j = 1, width = 1.2)
ft_1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.