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

View source: R/DfExtractDataset.R

DfExtractDatasetR Documentation

Extract a subset of treatments 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 treatments to be extracted. If this parameter is not supplied, all treatments are extracted.

rdrs

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

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.

Value

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

Examples

## Extract the data corresponding to the second reader in the 
## first modality from an included ROC dataset
ds1 <- DfExtractDataset(dataset05, trts = 1, rdrs = 2)

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


dpc10ster/rjafroc-master documentation built on Jan. 31, 2024, 1:07 p.m.