Learn R Programming

sgsR (version 1.5.0)

sample_existing_srs: Randomly sample from an existing dataset

Description

This function takes an existing sf object and returns a random sub-sample of size nSamp.

Usage

sample_existing_srs(existing, nSamp, filename = NULL, overwrite = FALSE)

Value

A data frame or spatial data frame containing the random sample.

Arguments

existing

sf 'POINT'. Existing plot network.

nSamp

Numeric. Number of desired samples.

filename

Character. Path to write output samples.

overwrite

Logical. Choice to overwrite existing filename if it exists.