Open-Systems-Pharmacology / OSPSuite.ParameterIdentification

R package for parameter identification for OSPS models
http://www.open-systems-pharmacology.org/OSPSuite.ParameterIdentification/
GNU General Public License v2.0
3 stars 1 forks source link

Example files are note included in the package #79

Closed Felixmil closed 9 months ago

Felixmil commented 12 months ago

In the user manual, example files are loaded: image

This will work on package dev environment but not on end-user computer (because test folder does not exist).

Instead, the example files should be located in the inst/extdata/ directory of the package so that they are made available to the user during package installation.

Then, the package should provide a utilitary function to easily access these files.

For example, if the example files are stored under inst/extdata/example we can add this in a example.R:

example_directory <- function() {
    dir(system.file("extdata", "example", package = "ospsuite.parameterIdentification"))
}

example_model <- function() {
    file.path(example_directory(), "Aciclvir.pkml")
}

This way, the vignettes could be updated to:

simulations <- c(loadSimulation(example_model())

This will work both during vignette generation and on user's computer.