Learn R Programming

rsurfer (version 0.2)

subjectDistributionTable: Create Subject Distribution Table

Description

Creates a data frame with the distributions of the subjects age and gender grouped by the field 'targetClassName', providing an overview of the subjects. Note: requires an 'Age' and 'Gender' column.

Usage

subjectDistributionTable(data, targetClassName)

Arguments

data

The subject data to create the table from

targetClassName

The name of the field to group the data by

Value

The subject distribution table in a data frame

Examples

Run this code
# NOT RUN {
all <- generaterandomsubjects(1000)
all$Age <- stats::runif(1000,50,80)
all <- addrandomgender(all)
all <- addrandomdiagnosis(all)
subjectDistributionTable(all, "Diagnosis")
# }

Run the code above in your browser using DataLab