Skip to contents

The function allows you to add one or more compartments to a model. When providing the ID of an already existing compartment, you can use this function to update the compartment's name.

Usage

addCompartment(model, id, name = NA)

Arguments

model

Model of class ModelOrg

id

Character vector with compartment IDs

name

Character vector for compartment names

Examples

fpath <- system.file("extdata", "e_coli_core.xml", package="cobrar")
mod <- readSBMLmod(fpath)
mod <- addCompartment(mod, id = "p", name = "periplasm")