Learn R Programming

rtables (version 0.4.0)

insert_rrow: [DEPRECATED] insert rrows at (before) a specific location

Description

This function is deprecated and will be removed in a future release of rtables. Please use insert_row_at_path or label_at_path instead.

Usage

insert_rrow(tbl, rrow, at = 1, ascontent = FALSE)

Arguments

tbl

rtable

rrow

rrow to append to rtable

at

position into which to put the rrow, defaults to beginning (ie 1)

ascontent

logical. Currently ignored.

Value

A TableTree of the same specific class as tbl

See Also

Other compatability: rtable()

Examples

Run this code
# NOT RUN {
o <- options(warn = 0)
tbl <- basic_table() %>%
    split_cols_by("Species") %>%
    analyze("Sepal.Length") %>%
    build_table(iris)

insert_rrow(tbl, rrow("Hello World"))
insert_rrow(tbl, rrow("Hello World"), at = 2)

tbl2 <- basic_table() %>%
    split_cols_by("Species") %>%
    split_rows_by("Species") %>%
    analyze("Sepal.Length") %>%
    build_table(iris)

insert_rrow(tbl2, rrow("Hello World"))
insert_rrow(tbl2, rrow("Hello World"), at = 2)
insert_rrow(tbl2, rrow("Hello World"), at = 4)

insert_rrow(tbl2, rrow("new row", 5, 6, 7))

insert_rrow(tbl2, rrow("new row", 5, 6, 7), at = 3)

options(o)
# }

Run the code above in your browser using DataLab