Learn R Programming

PCAmixdata (version 2.1)

recodquant: Recoding of the quantitative data matrix

Description

Recoding of the quantitative data matrix

Usage

recodquant(X)

Arguments

X
the quantitative data matrix

Value

  • Zthe standardized quantitative data matrix (centered and reduced with the standard deviations)
  • gthe means of the columns of X
  • sthe standard deviations of the columns of X (population version with 1/n)
  • XcodThe quantitative matrix X with missing values replaced with the column mean values

Examples

Run this code
data(decathlon)
X <- decathlon[1:5,1:5]
X[1,2] <- NA
X[2,3] <-NA
rec <- recodquant(X)

Run the code above in your browser using DataLab