ncat: Number of categories

Description Usage Arguments Value Author(s) Examples

View source: R/RcppExports.R

Description

This function returns the number of factor in each column of a categorical matrix.

Usage

1
ncat(Xcat)

Arguments

Xcat

A matrix of integers that contains categorical vector in each column.

Value

A row vector that contains the number of categories in each column.

Author(s)

Raphaël Jauslin raphael.jauslin@unine.ch

Examples

1
2
3
4
Xcat <-  matrix(c(sample(x = 1:6, size = 100, replace = TRUE),
            sample(x = 1:6, size = 100, replace = TRUE),
            sample(x = 1:6, size = 100, replace = TRUE)),ncol = 3)
ncat(Xcat)

StratifiedSampling documentation built on Sept. 24, 2021, 5:07 p.m.