create_symbol#
- pharmpy.modeling.create_symbol(model, stem, force_numbering=False)[source]#
Create a new unique variable symbol given a model
- Parameters:
model (Model) – Pharmpy model object
stem (str) – First part of the new variable name
force_numbering (bool) – Forces addition of number to name even if variable does not exist, e.g. COVEFF → COVEFF1
- Returns:
Symbol – Created symbol with unique name
Examples
>>> from pharmpy.modeling import load_example_model, create_symbol >>> model = load_example_model("pheno") >>> create_symbol(model, "TEMP") TEMP >>> create_symbol(model, "TEMP", force_numbering=True) TEMP1 >>> create_symbol(model, "CL") CL1