Add rows in body part
Add rows in the flextable's body. It can be inserted at the top or the bottom. The function is column oriented, labels are specified for each columns, there can be more than a value - resulting in more than a new row.
add_body(x, top = TRUE, ..., values = NULL)
x |
a |
top |
should the rows be inserted at the top or the bottom. |
... |
a named list (names are data colnames) of strings
specifying corresponding values to add. It is important
to insert data of the same type as the original data,
otherwise it will be transformed (probably into strings if
you add a |
values |
a list of name-value pairs of labels or values,
names should be existing col_key values. This argument can be used
instead of |
ft <- flextable(head(iris), col_keys = c( "Species", "Sepal.Length", "Petal.Length", "Sepal.Width", "Petal.Width" ) ) ft <- add_body( x = ft, Sepal.Length = 1:5, Sepal.Width = 1:5 * 2, Petal.Length = 1:5 * 3, Petal.Width = 1:5 + 10, Species = "Blah", top = FALSE ) ft <- theme_booktabs(ft) ft
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.