Learn R Programming

MRIaggr (version 1.1.5)

allocClinic: Allocate clinical data

Description

Allocate clinical data to a MRIaggr object.

Usage

"allocClinic"(object, add = FALSE, overwrite = FALSE, verbose = optionsMRIaggr("verbose")) <- value

Arguments

object
an object of class MRIaggr. REQUIRED.
value
the clinical data. A one row data.frame. REQUIRED.
add
should value be added to the existing clinical slot ? logical.
overwrite
if clinical parameters with the same names are already stored in object@clinic, can they be overwritten ? logical.
verbose
should the execution of the function be traced ? logical.

Value

None.

See Also

selectClinic to extract the clinical data.

Examples

Run this code
## load a MRIaggr object
data("MRIaggr.Pat1_red", package = "MRIaggr")

## allocate clinical data
allocClinic(MRIaggr.Pat1_red) <- data.frame(Age = 32, Sex = "Male", NIHSS_H0 = "5")
selectClinic(MRIaggr.Pat1_red, param = "Age")

## add a new parameter
allocClinic(MRIaggr.Pat1_red, add = TRUE, overwrite = TRUE) <- data.frame(City = "Lyon")
selectClinic(MRIaggr.Pat1_red)

Run the code above in your browser using DataLab