Skip to main content
Skip table of contents

newProject

Create a new project. New projects can be created in the connectors as in PKanalix, Monolix or Simulx GUI. The creation of a new project requires a dataset in PKanalix, a dataset and a model in Monolix, and a model in Simulx.

Usage

R
newProject(modelFile = NULL, data = NULL, mapping = NULL)

Arguments

modelFile

(character) Path to the model file. Mandatory for Monolix and Simulx, optional for PKanalix (used only for the CA part). Can be absolute or relative to the current working directory. To use a model from the libraries, you can find the model name with getLibraryModelName and set modelFile = "lib:modelName.txt" with the name obtained. To simulate inter-individual variability in Simulx with a new project, the model file has to include the statistical model, contrary to Monolix and PKanalix for which the model file only contains the structural model. Check here in detail how to write such a model from scratch.

data

(list) Structure describing the data. Mandatory for Monolix and PKanalix.

  • dataFile (character): Path to the data file (csv, xlsx, xlsx, sas7bdat, xpt or txt). Can be absolute or relative to the current working directory.

  • sheet [optional] (character): Name of the sheet in xlsx/xls file. If not provided, the first sheet is used.

  • headerTypes (vector): A vector of header types. The possible header types are: "ignore", "id", "time", "observation", "amount", "contcov", "catcov", "occ", "evid", "mdv", "obsid", "cens", "limit", "regressor", "nominaltime", "admid", "rate", "tinf", "ss", "ii", "addl", "date". Notice that these are not exactly the types displayed in the interface, they are shortcuts.

  • observationTypes [optional] (list): A list giving the type of each observation present in the data file. If there is only one y-type, the corresponding observation name can be omitted. The possible observation types are "continuous", "discrete", and "event".

  • nbSSDoses (integer): Number of doses (if there is a SS column for steady-state).

  • regressorsSettings [optional] (character): Regressors interpolation method. Either 'lastCarriedForward' (default) or 'linearInterpolation'.

mapping

[optional](list): A list of lists representing a link between observation types and model outputs. Each list contains:

  • obsId (character) Name of observation id present in the dataset. It corresponds to the content of column tagged as "obsid" in case of several obs ids, or to the header of the column tagged as "observation" otherwise

  • observationName (character) Name of the model prediction listed in the output= line of the structural model

  • modelOutput [Monolix] (character) Name of the observation, e.g "y1" (for continuous observations only)

Details

Note: instead of creating a project from scratch, it is also possible in Monolix and PKanalix to load an existing project with loadProject or importProject and change the dataset or the model with setData or setStructuralModel.

See also

newProject saveProject

Examples

R
# Create a new Monolix project
initializeLixoftConnectors("monolix")
data_file <- file.path(getDemoPath(), "1.creating_and_using_models", "1.1.libraries_of_models", "data", "warfarin_data.csv")
newProject(data = list(dataFile = data_file, 
                       headerTypes = c("id", "time", "amount", "observation", "obsid", "contcov", "catcov", "contcov")),
           modelFile = "lib:oral1_1cpt_IndirectModelInhibitionKin_TlagkaVClR0koutImaxIC50.txt",
           mapping = list(list(obsId = "1",
                               modelOutput = "Cc",
                               observationName = "y1"),
                          list(obsId = "2",
                               modelOutput = "R",
                               observationName = "y2")))
           
# Create a new PKanalix project
initializeLixoftConnectors("pkanalix")
data_file <- file.path(getDemoPath(), "1.basic_examples", "data", "data_BLQ.csv")
newProject(data = list(dataFile = data_file,
                       headerTypes = c("id", "time", "amount", "observation", "cens", "catcov")))

# Create a new Simulx project
initializeLixoftConnectors("simulx")
newProject(modelFile = "lib:oral1_1cpt_IndirectModelInhibitionKin_TlagkaVClR0koutImaxIC50.txt")
  
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.