Skip to contents

The function removes one or more rows from a 'flextable'.

Usage

delete_rows(x, i = NULL, part = "body")

Arguments

x

a 'flextable' object, see flextable-package to learn how to create 'flextable' object.

i

row selector, see section Row selection with the i parameter in <Selectors in flextable>.

part

part selector, see section Part selection with the part parameter in <Selectors in flextable>. Value 'all' can be used.

Details

Deleting one or more rows will result in the deletion of any span parameters that may have been set previously. They will have to be redone after this operation or performed only after this deletion.

Examples

ft <- flextable(head(iris))
ft <- delete_rows(ft, i = 1:5, part = "body")
ft

Sepal.Length

Sepal.Width

Petal.Length

Petal.Width

Species

5.4

3.9

1.7

0.4

setosa