Package: ospsuite.utils 1.11.1

Michael Sevestre

ospsuite.utils: Utility Functions for Open Systems Pharmacology R Packages

A collection of utility functions for R packages in the Open Systems Pharmacology ecosystem. Contains helper functions for working with R6 objects, enumerated lists, and text formatting. Additionally, it provides functions to validate argument inputs.

Authors:Open-Systems-Pharmacology Community [cph, fnd], Michael Sevestre [aut, cre], Pavel Balazki [aut], Juri Solodenko [aut], Indrajeet Patil [aut]

ospsuite.utils_1.11.1.tar.gz
ospsuite.utils_1.11.1.zip(r-4.7)ospsuite.utils_1.11.1.zip(r-4.6)ospsuite.utils_1.11.1.zip(r-4.5)
ospsuite.utils_1.11.1.tgz(r-4.6-any)ospsuite.utils_1.11.1.tgz(r-4.5-any)
ospsuite.utils_1.11.1.tar.gz(r-4.7-any)ospsuite.utils_1.11.1.tar.gz(r-4.6-any)
ospsuite.utils_1.11.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
ospsuite.utils/json (API)

# Install 'ospsuite.utils' in R:
install.packages('ospsuite.utils', repos = c('https://open-systems-pharmacology.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/open-systems-pharmacology/ospsuite.rutils/issues

Pkgdown/docs site:https://www.open-systems-pharmacology.org

On CRAN:

Conda:

5.19 score 2 stars 10 scripts 11 downloads 76 exports 11 dependencies

Last updated from:6d22617df4 (on v1.11.1). Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK142
source / vignettesOK207
linux-release-x86_64OK141
macos-release-arm64OK196
macos-oldrel-arm64OK182
windows-develOK99
windows-releaseOK87
windows-oldrelOK108
wasm-releaseOK112

Exports:characterOptioncliFormatenumenumGetKeyenumGetValueenumHasKeyenumKeysenumPutenumRemoveenumValuesflattenListfoldSafeformatNumericsgetEnumKeygetLogFoldergetOSPSuiteUtilsSettinghasEmptyStringshasOnlyDistinctValuesifEqualifIncludedifNotNullintegerOptionisEmptyisFileExtensionisFileUTF8isIncludedisOfLengthisOfTypeisPathAbsoluteisSameLengthisUTF8logCatchlogDebuglogErrorlogicalOptionlogInfologSafelogWarningmessagesnumericOptionobjectCountospPrintClassospPrintHeaderospPrintItemsospsuiteUtilsSettingNamesPrintablesetErrorMaskingsetInfoMaskingsetLogFoldersetWarningMaskingtictimeStamptoctoListtoMissingOfTypevalidateEnumValuevalidateHasOnlyDistinctValuesvalidateHasOnlyNonEmptyStringsvalidateIsCharactervalidateIsFileExtensionvalidateIsFileUTF8validateIsIncludedvalidateIsIntegervalidateIsLogicalvalidateIsNotEmptyvalidateIsNumericvalidateIsOfLengthvalidateIsOfTypevalidateIsOptionvalidateIsPathAbsolutevalidateIsSameLengthvalidateIsStringvalidatePathIsAbsolutevalidateVectorvalidateVectorRangevalidateVectorValues

Dependencies:clicrayongluelifecycleloggermagrittrpurrrR6rlangstringivctrs

Validating Options
Get started | Basic usage | Spec constructors | integerOption() | numericOption() | characterOption() | logicalOption() | Common parameters | nullAllowed | naAllowed | expectedLength | Error aggregation | Practical example

Last update: 2025-10-28
Started: 2025-10-28

Logging utils
Get started | Taking advantage of glue and cli formatting | Catching messages | Masking messages

Last update: 2025-07-25
Started: 2025-07-25

Readme and manuals

Help Manual

Help pageTopics
Create Character Option SpecificationcharacterOption
cliFormatcliFormat
Define an enumerated listenum
Get the key mapped to the given value in an 'enum'enumGetKey getEnumKey
Get enum valuesenumGetValue
Check if an enum has a certain key.enumHasKey
Get all keys of an enumenumKeys
Add a new key-value pairs to an 'enum'enumPut
Remove an entry from the enum.enumRemove
Get the values stored in an enumenumValues
Flatten a list to an atomic vector of desired typeflattenList
Safe fold calculationfoldSafe
formatNumericsformatNumerics
getLogFoldergetLogFolder
Get the value of a global '{ospsuite.utils}' package setting.getOSPSuiteUtilsSetting
Validate that no empty string is presenthasEmptyStrings validateHasOnlyNonEmptyStrings
Validate that a vector has only unique valueshasOnlyDistinctValues validateHasOnlyDistinctValues
Value conditional on equalityifEqual
Value conditional on inclusionifIncluded
Value conditional on 'NULL'ifNotNull
Create Integer Option SpecificationintegerOption
Validate if the provided object is emptyisEmpty validateIsNotEmpty
Validate if the provided path has required extensionisFileExtension validateIsFileExtension
Assess if a file is UTF-8 encoded.isFileUTF8
Check if a vector of values is included in another vector of valuesisIncluded validateIsIncluded
Check if the provided object has expected lengthisOfLength validateIsOfLength
Check if the provided object is of certain typeisOfType
Check if path is absoluteisPathAbsolute validateIsPathAbsolute validatePathIsAbsolute
Validate if objects are of same lengthisSameLength validateIsSameLength
Assess if a character vector is UTF-8 encoded.isUTF8
logCatchlogCatch
logDebuglogDebug
logErrorlogError
Create Logical Option SpecificationlogicalOption
logInfologInfo
Computes logarithm of a number or of a vector of numbers and handles zeros while substituting all values below 'epsilon' by 'epsilon'.logSafe
logWarninglogWarning
List of functions and strings used to signal error messagesmessages
Create Numeric Option SpecificationnumericOption
Count number of objectsobjectCount
Print an object's class nameospPrintClass
Print a header with specified levelospPrintHeader
Print a list of items with an optional titleospPrintItems
Names of the settings stored in 'ospsuiteEnv'. Can be used with 'getOSPSuiteUtilsSetting()'ospsuiteUtilsSettingNames
PrintablePrintable
setErrorMaskingsetErrorMasking
setInfoMaskingsetInfoMasking
setLogFoldersetLogFolder
setWarningMaskingsetWarningMasking
tictic
timeStamptimeStamp
toctoc
Make sure the object is a listtoList
Convert special constants to 'NA' of desired typetoMissingOfType
Check if 'value' is in the given 'enum'. If not, stops with an error.validateEnumValue
Validate if a file is UTF-8 encoded.validateIsFileUTF8
Check if the provided object is of certain type. If not, stop with an error.validateIsCharacter validateIsInteger validateIsLogical validateIsNumeric validateIsOfType validateIsString
Validate Options Against SpecificationsvalidateIsOption
Validate Vector Against Specified CriteriavalidateVector validateVectorRange validateVectorValues