splitTestTrain {netDx} | R Documentation

## Split samples into train/test

### Description

Split samples into train/test

### Usage

    splitTestTrain(pheno_DF, pctT = 0.7, verbose = FALSE)

### Arguments

`pheno_DF` | (data.frame) patient information Must contain the following columns: 1. ID: (char) patient IDs 2. STATUS: (char) patient classes. Values not equal to `predClass` will be considered as 'other' Expects rows with unique IDs
`pctT` | (numeric between 0 and 1) Fraction of patients to randomly assign to the training set. The remainder will be used for blind test set
`verbose` | (logical) print messages

### Value

(char) vector of length `nrow(pheno_DF)`, with values of 'TRAIN' or 'TEST'. The order corresponds to pheno_DF; a patient labelled 'TRAIN' has been assigned to the training set, and one labelled 'TEST' as been assigned to the test set.

### Examples

    data(pheno)
    x <- splitTestTrain(pheno)

[Package netDx version 1.1.4 Index]