Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sampleTransect

Sample transect


Description

Creates random transects from points and generates sample points along each transect

Usage

sampleTransect(x, min.length, max.length, id = NULL, ...)

Arguments

x

A sp point object

min.length

Minimum length of transect(s)

max.length

Maximum length of transect(s)

id

A unique identification column in x

...

Additional arguments passed to sample.line

Note

Function create random direction and length transects and then creates a point sample along each transect. The characteristic of the sample points are defined by arguments passed to the sample.line function

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

library(sp)
data(meuse)
coordinates(meuse) <- ~x+y
proj4string(meuse) <- CRS("+init=epsg:28992")
meuse <- meuse[sample(1:nrow(meuse),10),]

transects <- sampleTransect(meuse, min.length=200, 
                    max.length=500, min.samp = 3)
  plot(transects$transects)
    plot(transects$samples, pch=20, add=TRUE)

spatialEco

Spatial Analysis and Modelling Utilities

v1.3-6
GPL-3
Authors
Jeffrey S. Evans [aut, cre], Melanie A. Murphy [ctb], Karthik Ram [ctb]
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.