prcomp {stars} | R Documentation |
Principle components of stars object
Description
Compute principle components of stars object
Usage
## S3 method for class 'stars_proxy'
prcomp(x, ..., downsample = 0)
## S3 method for class 'stars'
prcomp(x, ..., quiet = FALSE)
Arguments
x |
object of class 'stars' or 'stars_proxy' |
... |
see prcomp |
downsample |
see st_as_stars |
quiet |
logical; if 'TRUE', suppress message that PCs will be computed on last dimension; see details |
Details
if 'x' has only one attribute, principle components will be computed in the space of the last dimension of 'x' to predict PC scores into a 'stars' object, use predict.stars; see example below
Value
object of class 'prcomp', see prcomp
Examples
l7 = split(st_as_stars(L7_ETMs), 3) # use bands as features
l7 |> prcomp() |> plot()
l7 |> prcomp() |> predict(l7, model = _) |> merge() |> plot()
[Package stars version 0.6-6 Index]