View source: R/part_partitionOccs.R
part_partitionOccs | R Documentation |
This function partitions occurrence data and background points according to a user-selected method.
part_partitionOccs(
occs,
bg,
method,
kfolds = NULL,
bgMask = NULL,
aggFact = NULL,
logger = NULL,
spN = NULL
)
occs |
data frame of cleaned or processed occurrences obtained from components occs: Obtain occurrence data or, poccs: Process occurrence data. |
bg |
coordinates of background points to be used for modeling. |
method |
character. Partitioning method to be used, one of 5 options: |
kfolds |
numeric. Number of partitions to create if selected method is random k-fold (must be >=2). If other method then keep default of NULL. |
bgMask |
a RasterStack or a RasterBrick of environmental layers cropped and masked. |
aggFact |
numeric. Aggregation factor to be used when using checkerboard partition (must be >= 1). |
logger |
Stores all notification messages to be displayed in the Log Window of Wallace GUI. Insert the logger reactive list here for running in shiny, otherwise leave the default NULL. |
spN |
data frame of cleaned occurrences obtained from component occs: Obtain occurrence data. Used to obtain species name for logger messages. |
This function is used in the partition occurrence data component. A user-selected method is used to partition occurrence and background points into different groups for model testing. A list of group assignments for both occurrences and background points is returned.
A list of two vectors containing group assignments for occurrences (occs.grp) and background points (bg.grp).
Jamie Kass <jamie.m.kass@gmail.com>
Gonzalo E. Pinilla-Buitrago <gepinillab@gmail.com>
Andrea Paz <paz.andreita@gmail.com>
partitions
## Not run:
envs <- envs_userEnvs(rasPath = list.files(system.file("extdata/wc",
package = "wallace"),
pattern = ".tif$", full.names = TRUE),
rasName = list.files(system.file("extdata/wc",
package = "wallace"),
pattern = ".tif$", full.names = FALSE))
occs <- read.csv(system.file("extdata/Bassaricyon_alleni.csv",
package = "wallace"))
bg <- read.csv(system.file("extdata/Bassaricyon_alleni_bgPoints.csv",
package = "wallace"))
partblock <- part_partitionOccs(occs, bg, method = 'rand', kfold = 4)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.