Protocol class for OSP snapshot protocols
Protocol.RdAn R6 class that represents a protocol in an OSP snapshot. This class provides methods to access different properties of a protocol and display a summary of its information. Protocols can be either simple (with dosing intervals) or advanced (with schemas and schema items).
An Advanced Protocol's schemas are exposed as a named list of Schema
objects, each of which owns a list of SchemaItem objects. Simple
Protocols expose their single application directly through the
application_type, dosing_interval, and parameters fields.
Active bindings
dataThe raw data of the protocol, refreshed from the wrapped Schema objects so mutations through the R6 surface flow back into the snapshot payload (read-only).
nameThe name of the protocol. Writable: must be a non-empty scalar string.
is_advancedWhether the protocol is advanced (schema-based)
application_typeThe application type (for simple protocols). Writable: must be one of the canonical PK-Sim application types (see
create_protocol()'sapplication_typeargument), orNULLto clear.dosing_intervalThe dosing interval (for simple protocols). Writable: must be one of the fixed PK-Sim dosing intervals (see
create_protocol()'sdosing_intervalargument), orNULLto clear.time_unitThe time unit for the protocol. Writable: must be a valid unit for dimension
"Time", orNULLto clear.parametersThe parameters of the protocol (for simple protocols). Writable: must be a list, or
NULLto clear.schemasA named list of Schema objects for advanced protocols. Names are taken from each schema's
namefield (duplicates are disambiguated bymake.unique). Simple protocols return an empty list.
Methods
Protocol$to_df()
Convert protocol data to a single consolidated tibble. Advanced
protocols emit one row per SchemaItem and join back to the
protocol via protocol_name. Simple protocols emit a single row.