Learn R Programming

softclassval (version 1.0-20160527)

nsamples: Number of samples

Description

Count number of samples

Usage

nsamples(r = r, groups = NULL, operator = "prd", hard.operator)

Arguments

r
reference class labels with samples in rows.
groups
grouping variable for the averaging by rowsum. If NULL, all samples (rows) are averaged.
operator
the operator to be used
hard.operator
optional: a logical determining whether only hard samples should be counted

Value

number of samples in each group (rows) for each class (columns) and all further dimensions of ref.

Details

Basically, the reference is summed up. For hard operators, the reference is hardened first: soft values, i.e. r in (0, 1) are set to NA.

Examples

Run this code
ref <- softclassval:::ref
ref
nsamples (ref)
nsamples (ref, hard.operator = TRUE)

Run the code above in your browser using DataLab