Export_Points: Export created points

View source: R/Export_Points.R

Export_PointsR Documentation

Export created points

Description

Export created points

Usage

Export_Points(Points, ID_Col = "ID", format = "SHP", name = "Samples")

Arguments

Points

The name of the SF file with the spatial points.

ID_Col

Name of the ID column, defaults to "ID".

format

a character, it can be SHP, GPX or RDS, default to "SHP".

name

The name of the file without the extension, defaults to "Samples".

Value

An exported SHP, GPX or RDS file

Examples

data(Bios)
library(terra)
Bios <- terra::unwrap(Bios)

a <- Stratify(Bios)


plot(a$FinalStack, colNA = "black")

FinalRaster <- a$FinalStack

Points <- Random_Stratified_Min_Dist(ClassRaster = FinalRaster,
                                     MinDist = 2000,
                                     n = 30,
                                     n_to_test = 100)

Export_Points(Points, name = "Selected")
# remove created files
file.remove(list.files(pattern = "Selected"))

Sustainscapes/GeoStratR documentation built on Aug. 9, 2024, 9:41 p.m.