backgroundForPCA: Generating background points for a pca

View source: R/CalculateNicheSubspeciesDifferences.R

backgroundForPCAR Documentation

Generating background points for a pca

Description

This function generates background points for making a PCA of environment.

Usage

backgroundForPCA(
  localities = locs_thinned,
  r = 1,
  num = (100 * nrow(localities)),
  e = Env,
  verbose = T
)

Arguments

localities

Cleaned and thinned localities

r

The radius in m with which to get background points

num

The number of background points

e

The environmental raster for niche

Examples


loc_good_clean = cleanByEnvironment(Env, loc)
locs_thinned = spThinBySubspecies(loc_good_clean,thin.par=10,reps=1,lat.col="latitude",long.col="longitude",spec.col="assigned")
loc_thin_bgstuff = backgroundForPCA(localities=loc_good[,c("Longitude","Latitude")],r=200000,num=(100*nrow(localities)),e=Env)

kaiyaprovost/subsppLabelR documentation built on March 17, 2024, 5:09 p.m.