Updates the model specification worksheet (MSW) of a bllflow model. Also updates the variable details sheet with metadata from a ddi document from the original bllflow model if it exists.

UpdateMSW(bllModel, newMSWVariables = NULL,
  newMSWVariableDeatails = NULL, newDDI = NULL)

Arguments

bllModel

A bllflow instance whose MSW will be updated

newMSWVariables

A dataframe containing the new MSW variables sheet

newMSWVariableDeatails

A dataframe containing the new MSW variable details sheet

newDDI

A ddi object to add to bllModel

Value

bllflow model with it's respective MSW members updated.

Examples

library(survival) library(bllflow) data(pbc) pbcDDI <- bllflow::ReadDDI(system.file("extdata", "", package="bllflow"), "pbcDDI.xml") # Read the MSW files variables <- read.csv(system.file("extdata", "PBC-variables.csv", package="bllflow")) variableDetails <- read.csv(system.file("extdata", "PBC-variableDetails.csv", package="bllflow")) # Create a BLLFlow object and add labels. pbcModel <- bllflow::BLLFlow(pbc, variables, variableDetails, pbcDDI)
#> Warning: Row 2 : valueLabelStart column has value " male " but DDI value is " Male ". Not overwriting
#> Warning: Row 2 : from column has value " 1 " but DDI value is " 1:1 ". Not overwriting
#> Warning: Row 1 : valueLabelStart column has value " female " but DDI value is " Female ". Not overwriting
#> Warning: Row 1 : from column has value " 2 " but DDI value is " 2:2 ". 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 : from column has value " 0 " but DDI value is " 1:1 ". Not overwriting
pbcModel <- bllflow::UpdateMSW(pbcModel, variables, variableDetails)
#> Warning: Row 2 : valueLabelStart column has value " male " but DDI value is " Male ". Not overwriting
#> Warning: Row 2 : from column has value " 1 " but DDI value is " 1:1 ". Not overwriting
#> Warning: Row 1 : valueLabelStart column has value " female " but DDI value is " Female ". Not overwriting
#> Warning: Row 1 : from column has value " 2 " but DDI value is " 2:2 ". 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 : from column has value " 0 " but DDI value is " 1:1 ". Not overwriting
pbcModel <- bllflow::UpdateMSW(pbcModel, variables) pbcModel <- bllflow::UpdateMSW(pbcModel, newMSWVariableDeatails = variableDetails)
#> Warning: Row 2 : valueLabelStart column has value " male " but DDI value is " Male ". Not overwriting
#> Warning: Row 2 : from column has value " 1 " but DDI value is " 1:1 ". Not overwriting
#> Warning: Row 1 : valueLabelStart column has value " female " but DDI value is " Female ". Not overwriting
#> Warning: Row 1 : from column has value " 2 " but DDI value is " 2:2 ". 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 : from column has value " 0 " but DDI value is " 1:1 ". Not overwriting