augment.LDA: Implementation of broom::augment() for LDA objects

Description Usage Arguments Value Examples

View source: R/tidy.R

Description

Augments a matrix or a data.frame with its projections onto the LDA components

Usage

1
augment.LDA(L, newdata)

Arguments

L

an LDA object, as produced by LDA()

newdata

a matrix or a data.frame containing data to be projected onto the LDA components

Value

a data.frame of eigenvalues from the associated generalized eigenvalue problem

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
model <- LDA( Species ~ ., iris )
head( broom::augment( model, iris ) )
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species     LDA1      LDA2
## 1          5.1         3.5          1.4         0.2  setosa 3.975771 -7.238048
## 2          4.9         3.0          1.4         0.2  setosa 3.259856 -6.160564
## 3          4.7         3.2          1.3         0.2  setosa 3.584227 -6.640101
## 4          4.6         3.1          1.5         0.2  setosa 2.976313 -6.318533
## 5          5.0         3.6          1.4         0.2  setosa 4.031178 -7.451516
## 6          5.4         3.9          1.7         0.4  setosa 3.629979 -8.322717
##

## End(Not run)

ArtemSokolov/linproj documentation built on May 7, 2019, 1:22 p.m.