select.randquad {CTFS} | R Documentation

## Randomly Select the Coordinates of Quadrate

### Description

Takes a vector of quadrate sizes and randomly selects a point on the plot as the initial corner. This function is called by `spp.randarea.range` and is not usually called alone.

### Usage

    select.randquad(quadside, shape = 1, plotdim = c(1000, 500), replicates =
    100)

### Arguments

`quadside` | vector of dimensions (x) of the randomly selected area in meters
`shape` | single value numeric, factor used to determine dimension y of quadrate. for a square, shape = 1
`plotdim` | plot dimensions, x,y lengths in meters
`replicates` | number of randomly selected areas to sample

### Details

The dimensions of the selected quadrate are determined by the values in `quadside` and `shape`. The quadrate dimensions are x = `quadside[i]` and y = `quadside[i]`* `shape[i]`. If one `shape` value is provided then it is used for all quadrates. The returned x and y coordinates, paired, define the four corners of the quadrates.

### Value

`xlo` | x coordinate
`ylo` | y coordinate
`xhi` | x coordinate
`yhi` | y coordinate
`area` | area of each quadrate in hectares

### Author(s)

Rick Condit, Suzanne Lao and Pamela Hall

### See Also

`CTFS.diversity`

### Examples

    ## Not run:
    1. There are no defaults for this function, parameters must be
    supplied. This results in 10 sets of coordinates for 1 hectare, square
    quadrates.

    select.randquad(quadside=100,shape=1,replicates=10)

    2. Try a rectangular quadrate and quadrates of different shapes

    select.randquad(quadside=100,shape=2,replicates=10)
    select.randquad(quadside=100,shape=c(2,3),replicates=10)
    select.randquad(quadside=c(10,100),shape=1,replicates=10)
    select.randquad(quadside=c(10,100),shape=c(2,3),replicates=10)
    ## End(Not run)

[Package CTFS version 1.00 Index]