Learn R Programming

PCAmixdata (version 3.1)

tab.disjonctif.NA: Built an indicator matrix

Description

This function built the indicator matrix of a qualitative data matrix. Missing observations are indicated as NAs.

Usage

tab.disjonctif.NA(tab, rename.level = FALSE)

Arguments

tab

a categorical data matrix..

rename.level

boolean, if TRUE all the levels of the qualitative variables are renamed as follows: variable_name=level_name.

Value

Returns the indicator matrix with NA for missing observations.

Details

This function uses the code of the function tab.disjonctif implemented in the package FactoMineR but is different. Here, a NA value appears when a category has not been observed in a row. In the function tab.disjonctif of the package FactoMineR, a new column is created in that case.

Examples

Run this code
# NOT RUN {
data(vnf)
X <- vnf[1:10,9:12]
tab.disjonctif.NA(X)


# }

Run the code above in your browser using DataLab