Skip to main content
Skip table of contents

setData

Set project data giving a data file and specifying headers and observations types.

Usage

R
setData(
  dataFile,
  headerTypes,
  observationTypes = NULL,
  nbSSDoses = NULL,
  regressorsSettings = NULL,
  sheet = NULL
)

Arguments

dataFile

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

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 the types displayed in the interface, these one 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

[optional](integer): Number of doses (if there is a SS column).

regressorsSettings

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

sheet

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

See also

Examples

R
if (FALSE) {
setData(dataFile = "/path/to/data/file.txt", 
        headerTypes = c("IGNORE", "OBSERVATION"), observationTypes = "continuous")
setData(dataFile = "/path/to/data/file.txt", 
        headerTypes = c("IGNORE", "OBSERVATION", "YTYPE"), 
       observationTypes = list(Concentration = "continuous", Level = "discrete"))
setData(dataFile = "/path/to/data/file.xlsx", sheet = "sheet2",
        headerTypes = c("IGNORE", "OBSERVATION", "YTYPE"), 
       observationTypes = list(Concentration = "continuous", Level = "discrete"))
}
JavaScript errors detected

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

If this problem persists, please contact our support.