Learn R Programming

ecospat (version 2.1.1)

ecospat.occ.desaggregation: Species Occurrences Desaggregation

Description

Remove species occurrences in a dataframe that are closer to each other than a specified distance threshold.

Usage

ecospat.occ.desaggregation (dfvar, colxy, colvar=NULL, min.dist, plot=TRUE)

Arguments

dfvar

A dataframe with x, y, and variables.

colxy

The range of columns for x and y in df.

colvar

The range of columns for variables in df.

min.dist

The minimun distance threshold in the sub-dataframe.

plot

A boolean indicating whether to plot the resulting distribution of occurrences.

Value

A subset of df with the columns specified in colvar.

Details

The number of occurrences kept and excluded is shown in a dynamic plot. At the end of the selection process, a plot showing the resulting distribution of occurrences will be plotted if argument plot=FALSE

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
spp <- ecospat.testNiche
sp1 <- spp[1:32,1:3]

occ.sp1 <- ecospat.occ.desaggregation(dfvar=sp1,colxy=2:3,colvar=NULL, min.dist=500,plot=TRUE)
# }

Run the code above in your browser using DataLab