# Generic Implementation of a PK/PD Model

## Documentation for package ‘campsismod’ version 1.3.2

- DESCRIPTION file
- User guides, package vignettes and other documentation
- Package NEWS
- Package README

## Help Pages

A B C D E F G H I J L M O P R S T U V W

## -- A --

add | Add element to list.
add-method | Add element to list.
addRSE | Add relative standard error (RSE) to the specified parameter.
addRSE-method | Add relative standard error (RSE) to the specified parameter.
addSuffix | Generic function to add a suffix to various objects like parameters, code records, compartment names or a model (all previous objects at the same time). This makes it an extremely powerful function to combine 2 models or more (using function 'add'), that have similar equation, parameter or compartment names.
addSuffix-method | Generic function to add a suffix to various objects like parameters, code records, compartment names or a model (all previous objects at the same time). This makes it an extremely powerful function to combine 2 models or more (using function 'add'), that have similar equation, parameter or compartment names.
as.data.frame | As data frame method.
as.data.frame-method | As data frame method.
assertSingleCharacterString | Assert the given character vector is a single character string.
autoDetectNONMEM | Auto-detect special variables from NONMEM as compartment properties. Bioavailabilities, infusion durations/rates and lag times will be automatically detected.
autoDetectNONMEM-method | Auto-detect special variables from NONMEM as compartment properties. Bioavailabilities, infusion durations/rates and lag times will be automatically detected.
AutoReplicationSettings | Create auto replication settings.
auto_replication_settings-class | Auto replication settings class.

## -- B --

Bioavailability | Create a bioavailability for the specified compartment.

## -- C --

CampsisModel | Create a new Campsis model.
campsis_model-class | Campsis model class.
CodeRecords | Create a list of code records.
code_record-class | Code record class. See this code record as an abstract class. 2 implementations are possible: - properties record (lag, duration, rate & bioavailability properties) - statements record (main, ode & error records)
Comment | Create a new comment.
comment-class | Comment class. A statement starting with #.
Compartment | Create a compartment.
compartment-class | Compartment class.
Compartments | Create a list of compartments
compartments-class | Compartments class.
compartment_bioavailability-class | Compartment bioavailability class.
compartment_infusion_duration-class | Compartment infusion duration class.
compartment_infusion_rate-class | Compartment infusion rate class.
compartment_initial_condition-class | Compartment initial condition class.
compartment_lag_time-class | Compartment lag time class.
compartment_properties-class | Compartment properties class.
compartment_property-class | Compartment property class.

## -- D --

default | Get default element from list.
delete | Delete an element from this list.
delete-method | Delete an element from this list.
disable | Disable.
disable-method | Disable.
double_array_parameter-class | Double-array parameter class. This parameter has 2 indexes. It can thus be used to define correlations between parameters.
duration_record-class | (Infusion)-duration record class.

## -- E --

Equation | Create a new equation.
equation-class | Equation class. Any statement in the form A = B.
ErrorRecord | Create ERROR code record.
error_record-class | Error record class.
export | Export function.
export-method | Export function.
exportToJSON | Export the given object to a JSON object, ready to be written to files.
exportToJSON-method | Export the given object to a JSON object, ready to be written to files.
export_type-class | Export type class.
extractLhs | Extract left-hand-side expression.
extractRhs | Extract right-hand-side expression.
extractTextBetweenBrackets | Extract text between brackets.

## -- F --

find | Find an element in list.
find-method | Find an element in list.
fixOmega | Fix omega matrix for SAME OMEGA parameters that have NA values due to imperfections in Pharmpy import.
fixOmega-method | Fix omega matrix for SAME OMEGA parameters that have NA values due to imperfections in Pharmpy import.
f_record-class | Bioavailability record class.

## -- G --

getByIndex | Get element by index.
getByIndex-method | Get element by index.
getByName | Get an element from a list by name. Never return more than 1 element.
getByName-method | Get an element from a list by name. Never return more than 1 element.
getCampsismodOption | Get Campsismod option logic.
getCompartmentIndex | Get the compartment index for the specified compartment name.
getCompartmentIndex-method | Get the compartment index for the specified compartment name.
getName | Get element name.
getName-method | Get element name.
getNameInModel | Get the name of the given parameter in the Campsis model.
getNameInModel-method | Get the name of the given parameter in the Campsis model.
getNames | Get element names from list.
getNames-method | Get element names from list.
getNONMEMName | Get NONMEM name.
getNONMEMName-method | Get NONMEM name.
getOmegaBlock | Get the right block of OMEGA's.
getOmegaBlock-method | Get the right block of OMEGA's.
getOmegaIndexes | Get the indexes of the omegas.
getOmegaIndexes-method | Get the indexes of the omegas.
getPrefix | Get prefix.
getPrefix-method | Get prefix.
getRecordDelimiter | Get record delimiter.
getRecordName | Get record name.
getRecordName-method | Get record name.
getUncertainty | Get uncertainty on the parameters.
getUncertainty-method | Get uncertainty on the parameters.
getVarCov | Get variance-covariance matrix.
getVarCov-method | Get variance-covariance matrix.

## -- H --

hasComment | Check if string contains Campsis-style comments.
hasExactMethod | Has exact method allows to check the existence of a S4 method in Campsis based on its signature.
hasOffDiagonalOmegas | Has off-diagonal omegas.
hasOffDiagonalOmegas-method | Has off-diagonal omegas.

## -- I --

IfStatement | Create a new IF-statement.
if_statement-class | If-statement class. Any statement in the form if (condition) A = B.
indexOf | Get the index of an element in list.
indexOf-method | Get the index of an element in list.
InfusionDuration | Create an infusion duration.
InfusionRate | Create an infusion rate.
InitialCondition | Create an initial condition.
init_record-class | Init record class.
isComment | Check if string is a Campsis comment (i.e. not an equation).
isDiag | Is diagonal.
isDiag-method | Is diagonal.
isEmptyLine | Check if string is an empty line.
isEquation | Say if line in record is an equation not.
isIfStatement | Say if line in record is an IF-statement.
isMatrixPositiveDefinite | Is matrix positive definite. Same check as 'mvtnorm' does.
isODE | Say if line(s) in record is/are ODE or not.
isRecordDelimiter | Is record delimiter. A record delimiter is any line starting with [...].
isStrictRecordDelimiter | Is strict record delimiter. A strict record delimiter is any line starting with [...] and followed by nothing but spaces or a possible comment.

## -- J --

JSONElement | Instantiate a JSON element.
jsonToOffDiagParameter | Convert JSON correlation parameter (OMEGA or SIGMA) into a Campsis parameter.
jsonToParameter | JSON to Campsis parameter.
json_element-class | JSON element class.

## -- L --

LagTime | Create a lag time for the specified compartment.
lag_record-class | Lag record class.
LineBreak | Create a new line break.
line_break-class | Line-break class. A linebreak in the model.
loadFromJSON | Fill-in S4 object from the JSON content.
loadFromJSON-method | Fill-in S4 object from the JSON content.

## -- M --

MainRecord | Create MAIN code record.
main_record-class | Main record class.
ManualReplicationSettings | Create manual replication settings.
manual_replication_settings-class | Manual replication settings class.
mapJSONPropertiesToS4Slots | Map JSON properties to S4 slots.
mapS4SlotsToJSONProperties | Map S4 slots to JSON properties.
maxIndex | Max index.
maxIndex-method | Max index.
minIndex | Min index.
minIndex-method | Min index.
ModelStatements | Create an empty list of model statements.
model_statement-class | Model statement class. Any statement in a code record.
model_statements-class | Model statements class. A list of statements.
model_suite | Campsis model suite.
move | Move element 'x' from object to a certain place.
move-method | Move element 'x' from object to a certain place.
mrgsolveBlock | Convert code record for mrgsolve.
mrgsolveCapture | Get the CAPTURE block for mrgsolve.
mrgsolveCompartment | Get the compartment block for mrgsolve.
mrgsolveMain | Get the MAIN block for mrgsolve.
mrgsolveMatrix | Get the OMEGA/SIGMA matrix for mrgsolve.
mrgsolveOde | Get the ODE block for mrgsolve.
mrgsolveParam | Get the parameters block for mrgsolve.
mrgsolveTable | Get the TABLE block for mrgsolve.
mrgsolve_type-class | Mrgsolve export type class.

## -- O --

Ode | Create a new ordinary differential equation (ODE).
ode-class | ODE class. Any statement in the form d/dt(A_CMT) = B.
OdeRecord | Create ODE code record.
ode_record-class | ODE record class.
Omega | Create an OMEGA parameter.
omega-class | Omega parameter class.
OmegaBlock | Create a block of OMEGA's.
OmegaBlocks | Create a list of OMEGA blocks.

## -- P --

parameter-class | Parameter class. Any parameter in a pharmacometric model.
Parameters | Create a list of parameters.
parameters-class | Parameters class.
parseIfStatement | Parse IF-statement. Assumption: 'isIfStatement' method already called and returned TRUE.
parseStatements | Parse statements code and return Campsis statements.
Pattern | Create a pattern.
pattern-class | Pattern class.
pmx_element-class | PMX element class.
pmx_position-class | PMX position class.
pmx_position_by_element-class | PMX position by element class.
pmx_position_by_index-class | PMX position by index class.
Position | Element position in list.
processExtraArg | Process extra arguments.
processJSONDoubleArrayParameter | Process JSON double array parameter.
properties_record-class | Properties record class.

## -- R --

rate_record-class | (Infusion)-rate record class.
read | Generic read method to read data from a file or a folder.
read.allparameters | Read all parameters files at once.
read.campsis | Read a Campsis model.
read.model | Read model file.
read.parameters | Read parameters file.
read.varcov | Read variance-covariance file.
replace | Replace element by another in list.
replace-method | Replace element by another in list.
replaceAll | Replace all occurrences in object.
replaceAll-method | Replace all occurrences in object.
replicate | Replicate generic object.
replicate-method | Replicate generic object.
replicated_campsis_model-class | Replicated Campsis model class.
replication_settings-class | Replication settings interface.
rxodeCode | Get code for rxode2
rxodeMatrix | Get the OMEGA/SIGMA matrix for rxode2.
rxodeParams | Get the parameters vector for rxode2.
rxode_type-class | RxODE/rxode2 export type class.

## -- S --

select | Get a subset of an object.
select-method | Get a subset of an object.
setMinMax | Set the minimum and maximum value on a model parameter.
setMinMax-method | Set the minimum and maximum value on a model parameter.
shiftOmegaIndexes | Shift OMEGA indexes.
shiftOmegaIndexes-method | Shift OMEGA indexes.
Sigma | Create a SIGMA parameter.
sigma-class | Sigma parameter class.
single_array_parameter-class | Single-array parameter class. This parameter has a single index value.
sort | Sort the specified list.
sort-method | Sort the specified list.
standardise | Standardise.
standardise-method | Standardise.
statements_record-class | Statements record class.

## -- T --

Theta | Create a THETA parameter.
theta-class | Theta parameter class.
toString | ToString generic method.
toString-method | ToString generic method.
trim | Trim character vector. Remove all leading and trailing spaces.

## -- U --

UnknownStatement | Create a new ordinary differential equation (ODE).
unknown_statement-class | Unknown statement class. Any statement not recognized by campsismod.
updateCompartments | Update compartments list from the persisted records. Exported especially for package 'campsistrans'. However, this method should not be called.

## -- V --

VariablePattern | Create a variable pattern.
variable_pattern-class | Variable pattern class.

## -- W --

write | Write generic object to files.
write-method | Write generic object to files.
writeParameters | Write subset of parameters (theta, omega or sigma).
writeVarcov | Write variance-covariance matrix.