create.lines: Create a systematic sample of parallel lines across a grid

Description Usage Arguments Value Author(s) See Also Examples

Description

Create a systematic set of lines to sample a rectangular grid. The grid is positioned with a random start on the study area. The systematic grid can be set at any angle and the number of lines is set by the spacing or the spacing is set by width and number of lines. This is a wrapper function for rlinegrid in spatstat.

Usage

1
create.lines(study.area,nlines=NULL,width,spacing=NULL,angle=0)

Arguments

study.area

owin class defining area

nlines

number of lines

width

full transect width

spacing

spacing distance between centerlines

angle

angle of rotation in degrees anticlockwise from x-axis

Value

lines dataframe with label,x0,y0,x1,y1,width where x0,y0 is beginning and x1,y1 is end of the line

Author(s)

Jeff Laake

See Also

simCovariates,simPts

Examples

1
2
3
4
5
study.area=owin(xrange=c(0,100),yrange=c(0,100))
xp=create.lines(study.area,nlines=10,width=5,angle=180)
ls=lines_to_strips(xp,study.area)
plot(ls$lines,lty=2)
plot(owin(poly=ls$transects),add=TRUE)

Example output

Loading required package: spatstat
Loading required package: nlme
Loading required package: rpart

spatstat 1.52-1       (nickname: 'Apophenia') 
For an introduction to spatstat, type 'beginner' 


Note: R version 3.4.1 (2017-06-30) is more than 9 months old; we strongly recommend upgrading to the latest version
Loading required package: RandomFields
Loading required package: sp
Loading required package: RandomFieldsUtils

Attaching package: 'RandomFields'

The following object is masked from 'package:RandomFieldsUtils':

    RFoptions

The following object is masked from 'package:nlme':

    Variogram

The following objects are masked from 'package:base':

    abs, acosh, asin, asinh, atan, atan2, atanh, cos, cosh, exp, expm1,
    floor, gamma, lgamma, log, log1p, log2, logb, max, min, round, sin,
    sinh, sqrt, tan, tanh, trunc

This is DSpat 0.1.6

Warning messages:
1: In `[<-`(`*tmp*`, i, value = <S4 object of class "gpc.poly">) :
  implicit list embedding of S4 objects is deprecated
2: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
3: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
4: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
5: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
6: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
7: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
8: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
9: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated
10: In `[<-`(`*tmp*`, i, value = gpc) :
  implicit list embedding of S4 objects is deprecated

DSpat documentation built on May 2, 2019, 11:10 a.m.