split_into_pages_by_var {rlistings} | R Documentation |
Split Listing by Values of a Variable
Description
Split is performed based on unique values of the given parameter present in the listing. Each listing can only be split by variable once. If this function is applied prior to pagination, parameter values will be separated by page.
Usage
split_into_pages_by_var(lsting, var, page_prefix = var)
Arguments
lsting |
listing_df. The listing to split. |
var |
character. Name of the variable to split on. |
page_prefix |
character. Prefix to be appended with the split value ( |
Value
A list of lsting_df
objects each corresponding to a unique value of var
.
Note
This function should only be used after the complete listing has been created. The listing cannot be modified further after applying this function.
Examples
dat <- ex_adae[1:20, ]
lsting <- as_listing(
dat,
key_cols = c("USUBJID", "AGE"),
disp_cols = "SEX",
main_title = "title",
main_footer = "footer"
) %>%
add_listing_col("BMRKR1", format = "xx.x") %>%
split_into_pages_by_var("SEX")
lsting
[Package rlistings version 0.2.9 Index]