Learn R Programming

RJafroc (version 1.0.1)

DfExtractDataset: Extract a subset of modalities and readers from a dataset

Description

Extract a dataset consisting of a subset of treatments/readers from a larger dataset

Usage

DfExtractDataset(dataset, trts, rdrs)

Arguments

dataset

The original dataset from which the subset is to be extracted

trts

A vector contains the indices of the modalities to be extracted. If this parameter is not supplied, all modalities are extracted.

rdrs

A vector contains the indices of the readers to be extracted. If this parameter is not supplied, all readers are extracted.

Value

A new dataset containing only the specified modalities and readers that were extracted from the original dataset

Details

Note that trts and rdrs are the vectors of indices not IDs. For example, if the ID of the first reader is "0", the corresponding value in trts should be 1 not 0.

Examples

Run this code
# NOT RUN {
## Extract the data corresponding to the second reader in the 
## first modality from an include ROC dataset
dataset1_2 <- DfExtractDataset(dataset05, trts = 1, rdrs = 2)

## Extract the data of the first and third reader in all modality from the include ROC dataset
datasetA_123 <- DfExtractDataset(dataset05, rdrs = c(1, 3))

# }

Run the code above in your browser using DataLab