View source: R/polypoly-package.R
poly_rescale | R Documentation |
Rescale the range of a polynomial matrix
poly_rescale(x, scale_width = 1)
x |
a matrix created by |
scale_width |
the desired range (max - min) for the first column of the matrix |
This function strips away the poly
class and the coefs
attribute of the matrix. This is because those attributes no longer
describe the transformed matrix.
the rescaled polynomial matrix (as a plain matrix with coefs
attribute removed)
m <- poly(1:10, degree = 4) # Difference between min and max values of first column is 10 scaled <- poly_rescale(m, scale_width = 10) scaled # Rescaled values are still orthogonal zapsmall(cor(scaled))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.