Creates a Long table to summarise data from multiple tables in one convenient table. Its primary use is to convert Table one tables into a long table. The optional arguments allow appending to long table as well as addition of labels

SummaryDataLong(tableOne, longTable = NULL, bllFlowModel = NULL)

Arguments

tableOne

the table one object to be converted into a long table

longTable

the optional long table to append the table one information to

bllFlowModel

The optional bllFlow object containing labels and extra information on the variables

Value

Returns the long table or the bllFlowModel with long table attached

Examples

library(survival) data(pbc) pbc$exp_percentile <- runif(nrow(pbc), 0, 1) pbc$ageGroup <- ifelse(pbc$age < 20, 1, ifelse(pbc$age >= 20 & pbc$age < 40, 2, ifelse(pbc$age >= 40 & pbc$age < 80, 3, ifelse(pbc$age >= 80, 4, NA)))) library(bllflow) variablesSheet <- read.csv(system.file("extdata", "PBC-variables.csv", package="bllflow")) variablesDetailsSheet <- read.csv(system.file("extdata", "PBC-variableDetails.csv", package = "bllflow")) ddi <- ReadDDI(system.file("extdata", '', package = "bllflow"),"pbcDDI.xml") pbcModel <- BLLFlow(pbc, variablesSheet, variablesDetailsSheet, ddi)
#> Warning: Row 2 : valueLabelStart column has value " male " but DDI value is " Male ". Not overwriting
#> Warning: Row 1 : valueLabelStart column has value " female " but DDI value is " Female ". Not overwriting
#> Warning: Row 9 : valueLabelStart column has value " No edema " but DDI value is " edema despite diuretic therapy ". Not overwriting
#> Warning: Row 9 : label column has value " Edema " but DDI value is " edema ". Not overwriting
#> Warning: Row 9 : low column has value " 0 " but DDI value is " 1 ". Not overwriting
#> Warning: Row 9 : high column has value " 0 " but DDI value is " 1 ". Not overwriting
pbcTableOne <- CreateTableOne(pbcModel, strata = "edema") pbcSummaryTableNoLabels <- SummaryDataLong(pbcTableOne) pbcLongTableWithLabel <- SummaryDataLong(pbcTableOne, bllFlowModel = pbcModel, longTable = pbcSummaryTableNoLabels)