Learn R Programming

rsurfer (version 0.2)

addrandomdiagnosis: Add Random Diagnosis

Description

This function will add a random diagnosis to every subject. It works by appending a Diagnosis column to the input data frame 'all'. Half of the diagnosis will be 'HC' (healthy control) and the other half will be 'AD' (Alzheimer's Disease).

Usage

addrandomdiagnosis(all)

Arguments

all

The data frame to add a Diagnosis column to

Value

The input data frame with a Diagnosis column added

Examples

Run this code
# NOT RUN {
data <- generaterandomsubjects()
addrandomdiagnosis(data)
# }

Run the code above in your browser using DataLab