Select Page

# Description of the functions concerning the project management

## Description of the functions of the API

 getStructuralModel Get the model file for the structural model used in the current project. loadProject Load a project by parsing the Mlxtran-formated file whose path has been given as an input. newProject Create a new empty project providing model and data specification. saveProject Save the current project as an Mlxtran-formated file.

## [Monolix – PKanalix – Simulx] Get structural model file

### Description

Get the model file for the structural model used in the current project. For Simulx, this function will return the structural model only if the project was imported from Monolix, and NULL otherwise.

### Usage

getStructuralModel()


### Value

A string corresponding to the path to the structural model file.

 setStructuralModel

## Not run:

getStructuralModel() => “/path/to/model/inclusion/modelFile.txt”

## End(Not run)

Top of the page, PKanalix R-functions, Monolix R-functions, Simulx R-functions.

## [Monolix – PKanalix – Simulx] Load project from file

### Description

Load a project by parsing the Mlxtran-formated file whose path has been given as an input.
WARNING: R is sensitive between ‘\’ and ‘/’, only ‘/’ can be used.

### Usage

loadProject(projectFile)


### Arguments

projectFile
(character) Path to the project file. Can be absolute or relative to the current working directory.

 saveProject

## Not run:

## End(Not run)

Top of the page, PKanalix R-functions, Monolix R-functions, Simulx R-functions.

## [Monolix – PKanalix – Simulx] Create new project

### Description

Create a new empty project providing model and data specification. The data specification is:

Monolix, PKanalix
• dataFile (string): path to the data file
• observationTypes [optional] (list): a list, indexed by observation name, giving the type of each observation present in the data file. If omitted, all the observations will be considered as “continuous”
• nbSSDoses (int): number of steady-state doses (if there is a SS column)
• mapping [optional](list): a list giving the observation name associated to each y-type present in the data file
(this field is mandatory when there is a column tagged with the “obsid” headerType)

Please refer to  setData documentation for a comprehensive description of the “data” argument structure.

Monolix only
• projectFile (string): path to the datxplore or pkanalix project file defining the data

### Usage

newProject(modelFile = NULL, data = NULL)


### Arguments

modelFile (character) Path to the model file. Can be absolute or relative to the current working directory.
To use a model from the libraries, you can set modelFile = “lib:modelName.txt”, e.g. modelFile = “lib:oral1_1cpt_kaVCl.txt”

data (list) Structure describing the data.

In case of PKanalix, data is mandatory and modelFile is optional (used only for the CA part and must be from the library).
In case of Monolix, data and modelFile are mandatory. It can be replaced by a projectFile corresponding to a Datxplore or PKanalix project file.
In case of Simulx, modelFile is mandatory and data = NULL. It can be replaced by a projectFile corresponding to a Monolix project. In that case, the Monolix project will be imported into Simulx.

 newProject  saveProject

## Not run:

newProject(data = list(dataFile = “/path/to/data/file.txt”,

observationTypes = “continuous”),

modelFile = “/path/to/model/file.txt”)

newProject(data = list(dataFile = “/path/to/data/file.txt”,

observationTypes = list(concentration = “continuous”, effect = “discrete”),

mapping = list(“1” = “concentration”, “2” = “effect”)),

modelFile = “/path/to/model/file.txt”)

[Monolix only]

newProject(data = list(projectFile = “/path/to/project/file.datxplore”),

modelFile = “/path/to/model/file.txt”)

[Simulx only]

newProject(modelFile = “/path/to/model/file.txt”)

new project from an import of a structural model

newProject(modelFile = “/path/to/monolix/project/file.mlxtran”)

new project from an import of a monolix model

## End(Not run)

Top of the page, PKanalix R-functions, Monolix R-functions, Simulx R-functions.

## [Monolix – PKanalix – Simulx] Save current project

### Description

Save the current project as an Mlxtran-formated file. The extensions are .mlxtran for Monolix, .pkx for PKanalix, and .smlx for Simulx.
WARNING: R is sensitive between ‘\’ and ‘/’, only ‘/’ can be used.

### Usage

saveProject(projectFile = "")
[Pkanalix only]
saveProject("/path/to/project/file.pkx")
[Monolix only]
saveProject("/path/to/project/file.mlxtran")
[Simulx only]
saveProject("/path/to/project/file.smlx")


### Arguments

projectFile
[optional](character) Path where to save a copy of the current model. Can be absolute or relative to the current working directory.
If no path is given, the file used to build the current configuration is updated.

 newProject  loadProject