spca_project: spca_project: Project Principal Component Analysis in various...

View source: R/spca_project.R

spca_projectR Documentation

spca_project: Project Principal Component Analysis in various spatio-temporal scenarios in bash mode

Description

A simple function to project Principal Component Analysis for Spatial Data in various spatial-temporal scenarios.

Usage

spca_project(
  layers_stack,
  layers_to_proj_dirs,
  sv_dir,
  pca_proj_dir_names = NULL,
  pca_obj = NULL,
  layers_format = ".tif"
)

Arguments

layers_stack

A RasterStack of environmental variables.

layers_to_proj_dirs

Paths to directories of projection layers

sv_dir

A directory where the PCs will be saved. If NULL the PCs will not be written.

pca_proj_dir_names

A vector with directory names where PCs will be saved. For example, pca_ccsm4_2050_6

pca_obj

An object of class prcomp (default NULL). Usefull when the user already has done the PCa for layers_stack.

layers_format

A raster format for writing PCA results (see writeFormats). Default = ".asc"

Details

proj_dir_names and layers_to_proj_dirs must have the same length. If user does not provide names for projection directories, ntbox will create directories for each projection scenario.

It uses the function spca to compute PCs


luismurao/ntbox documentation built on Nov. 22, 2024, 4 a.m.