Description Usage Arguments Details Value Author(s) Examples
Interfaces to pls
functions that can be used
in a pipeline implemented by magrittr
.
1 2 3 4 |
data |
data frame, tibble, list, ... |
... |
Other arguments passed to the corresponding interfaced function. |
Interfaces call their corresponding interfaced function.
Object returned by interfaced function.
Roberto Bertolusso
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ## Not run:
library(intubate)
library(magrittr)
library(pls)
## cppls
## Original function to interface
yarn.cppls <- cppls(density ~ NIR, ncomp = 6, data = yarn, validation = "CV")
summary(yarn.cppls)
## The interface reverses the order of data and formula
yarn.cppls <- ntbt_cppls(yarn, density ~ NIR, ncomp = 6, validation = "CV")
summary(yarn.cppls)
## so it can be used easily in a pipeline.
yarn %>%
ntbt_cppls(density ~ NIR, ncomp = 6, validation = "CV") %>%
summary()
## mvr
## Original function to interface
yarn.mvr <- mvr(density ~ NIR, ncomp = 6, data = yarn, validation = "CV",
method = "oscorespls")
summary(yarn.mvr)
## The interface reverses the order of data and formula
yarn.mvr <- ntbt_mvr(yarn, density ~ NIR, ncomp = 6, validation = "CV",
method = "oscorespls")
summary(yarn.mvr)
## so it can be used easily in a pipeline.
yarn %>%
ntbt_mvr(density ~ NIR, ncomp = 6, validation = "CV",
method = "oscorespls") %>%
summary()
## pcr
## Original function to interface
yarn.pcr <- pcr(density ~ NIR, ncomp = 6, data = yarn, validation = "CV")
summary(yarn.pcr)
## The interface reverses the order of data and formula
yarn.pcr <- ntbt_pcr(yarn, density ~ NIR, ncomp = 6, validation = "CV")
summary(yarn.pcr)
## so it can be used easily in a pipeline.
yarn %>%
ntbt_pcr(density ~ NIR, ncomp = 6, validation = "CV") %>%
summary()
## plsr
## Original function to interface
yarn.plsr <- plsr(density ~ NIR, ncomp = 6, data = yarn, validation = "CV")
summary(yarn.plsr)
## The interface reverses the order of data and formula
yarn.plsr <- ntbt_plsr(yarn, density ~ NIR, ncomp = 6, validation = "CV")
summary(yarn.plsr)
## so it can be used easily in a pipeline.
yarn %>%
ntbt_plsr(density ~ NIR, ncomp = 6, validation = "CV") %>%
summary()
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.