knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(tidyverse)

Clean your code

Load in Data

gbif_raw <- read.csv(system.file('extdata','gbif.csv.gz', package = "evogear"))


gbif_1 <- clean_gbif(gbif_raw)


df_kde <- data.frame(species = gbif_1$species, 
                     decimallongitude = gbif_1$decimallongitude,
                     decimallatitude = gbif_1$decimallatitude)

gbif_2 <- KDE_filter(df_kde,FALSE, rec_min = 3)

Points to Poly

Here we introduce the function points_to_poly.

This function intends to take a dataframe of points and convert them into polygons. This can be done either by creating a circular plane around each point given a set diameter, through Alpha Hull, or via MCP.

It requires a few argumeasd:

  points2Poly <- function(points,x = 'x', y = 'y', species = 'species', map,
                        alpha = FALSE, a = 1,
                        type = 'All', buffer_m = 1000){...}
#Load in the required packages
  require(raster)
  require(alphahull)
  require(dismo)
  require(rangeBuilder)


dilljone/EvoGEAR documentation built on May 7, 2023, 5:12 a.m.