# Generic Implementation of a PK/PD Model

## Documentation for package ‘campsismod’ version 1.4.0

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

## 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.
add_rse | Add relative standard error (RSE) to the specified parameter.
add_rse-method | Add relative standard error (RSE) to the specified parameter.
add_suffix | 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.
add_suffix-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.
assert_single_character_string | Assert the given character vector is a single character string.
AutoReplicationSettings | Create auto replication settings.
auto_detect_nonmem | Auto-detect special variables from NONMEM as compartment properties. Bioavailabilities, infusion durations/rates and lag times will be automatically detected.
auto_detect_nonmem-method | Auto-detect special variables from NONMEM as compartment properties. Bioavailabilities, infusion durations/rates and lag times will be automatically detected.
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.
export_to_json | Export the given object to a JSON object, ready to be written to files.
export_to_json-method | Export the given object to a JSON object, ready to be written to files.
export_type-class | Export type class.
extract_lhs | Extract left-hand-side expression.
extract_rhs | Extract right-hand-side expression.
extract_text_between_brackets | Extract text between brackets.

## -- F --

find | Find an element in list.
find-method | Find an element in list.
fix_omega | Fix omega matrix for SAME OMEGA parameters that have NA values due to imperfections in Pharmpy import.
fix_omega-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 --

get_by_index | Get element by index.
get_by_index-method | Get element by index.
get_by_name | Get an element from a list by name. Never return more than 1 element.
get_by_name-method | Get an element from a list by name. Never return more than 1 element.
get_campsismod_option | Get Campsismod option logic.
get_compartment_index | Get the compartment index for the specified compartment name.
get_compartment_index-method | Get the compartment index for the specified compartment name.
get_name | Get element name.
get_name-method | Get element name.
get_names | Get element names from list.
get_names-method | Get element names from list.
get_name_in_model | Get the name of the given parameter in the Campsis model.
get_name_in_model-method | Get the name of the given parameter in the Campsis model.
get_nonmem_name | Get NONMEM name.
get_nonmem_name-method | Get NONMEM name.
get_omega_block | Get the right block of OMEGA's.
get_omega_block-method | Get the right block of OMEGA's.
get_omega_indexes | Get the indexes of the omegas.
get_omega_indexes-method | Get the indexes of the omegas.
get_prefix | Get prefix.
get_prefix-method | Get prefix.
get_record_delimiter | Get record delimiter.
get_record_name | Get record name.
get_record_name-method | Get record name.
get_uncertainty | Get uncertainty on the parameters.
get_uncertainty-method | Get uncertainty on the parameters.
get_var_cov | Get variance-covariance matrix.
get_var_cov-method | Get variance-covariance matrix.

## -- H --

has_comment | Check if string contains Campsis-style comments.
has_exact_method | Has exact method allows to check the existence of a S4 method in Campsis based on its signature.
has_off_diagonal_omegas | Has off-diagonal omegas.
has_off_diagonal_omegas-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.
index_of | Get the index of an element in list.
index_of-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.
is_comment | Check if string is a Campsis comment (i.e. not an equation).
is_diag | Is diagonal.
is_diag-method | Is diagonal.
is_empty_line | Check if string is an empty line.
is_equation | Say if line in record is an equation not.
is_if_statement | Say if line in record is an IF-statement.
is_matrix_positive_definite | Is matrix positive definite. Same check as 'mvtnorm' does.
is_ode | Say if line(s) in record is/are ODE or not.
is_record_delimiter | Is record delimiter. A record delimiter is any line starting with [...].
is_strict_record_delimiter | 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.
json_element-class | JSON element class.
json_to_parameter | JSON to Campsis parameter.

## -- 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.
load_from_json | Fill-in S4 object from the JSON content.
load_from_json-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.
map_json_properties_to_s4_slots | Map JSON properties to S4 slots.
map_s4_slots_to_json_properties | Map S4 slots to JSON properties.
max_index | Max index.
max_index-method | Max index.
min_index | Min index.
min_index-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.
mrgsolve_block | Convert code record for mrgsolve.
mrgsolve_capture | Get the CAPTURE block for mrgsolve.
mrgsolve_compartment | Get the compartment block for mrgsolve.
mrgsolve_main | Get the MAIN block for mrgsolve.
mrgsolve_matrix | Get the OMEGA/SIGMA matrix for mrgsolve.
mrgsolve_ode | Get the ODE block for mrgsolve.
mrgsolve_param | Get the parameters block for mrgsolve.
mrgsolve_table | 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.
parse_if_statement | Parse IF-statement. Assumption: 'is_if_statement' method already called and returned TRUE.
parse_statements | 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.
process_extra_arg | Process extra arguments.
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.
replace_all | Replace all occurrences in object.
replace_all-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.
rxode_code | Get code for rxode2
rxode_matrix | Get the OMEGA/SIGMA matrix for rxode2.
rxode_params | 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.
set_min_max | Set the minimum and maximum value on a model parameter.
set_min_max-method | Set the minimum and maximum value on a model parameter.
shift_omega_indexes | Shift OMEGA indexes.
shift_omega_indexes-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.
to_string | to_string generic method.
to_string-method | to_string 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.
update_compartments | 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.
write_parameters | Write subset of parameters (theta, omega or sigma).
write_varcov | Write variance-covariance matrix.