p.sort | R Documentation |
Sort and truncate predictors according to the strength of predictor-environment interaction
p.sort(x, y, method = "linear", n.pred = ncol(x), trunc = 1)
x |
A data matrix (raw: samples, col: predictors). |
y |
A vector of an environment in which the samples were collected. |
method |
A string to specify the method of regression for calculating R-squared values. "linear" (default), "quadratic" or "cubic" regression model can be specified. |
n.pred |
The number of predictors to be included in PLORN model (default: ncol(x)). |
trunc |
a threshold to be truncated (default: 1). |
A data matrix (raw: samples, col: sorted predictors)
Takahiko Koizumi
data(Pinus) train <- p.clean(Pinus$train) target <- Pinus$target cor(target, train[, 1]) train <- p.sort(train, target, trunc = 0.5) cor(target, train[, 1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.