elongate: Change the shape (aspect ratio) of a rectangle while...

Description Usage Arguments Value Examples

View source: R/sample_kindist.R

Description

This function is used to manipulate the dimensions parameter in other package functions, which control site dimentions. These geometries can be entered innto functions in a few ways: (a) a single numeric value, which will be interpreted as the length of the side of a square; (b) a numeric vector of length two, which will be interpreted as the length & width of the sample site; (c) either of the above passed to this function, which takes the rectangular site dimensions and alters their aspect ratio (ratio of length to width) while preserving the underlying area the study site covers.

Usage

1
elongate(dims, aspect = 1)

Arguments

dims

Original rectangle dimensions - either single number (length of side of square) or length 2 numeric vector (lengths of sides x and y of rectangle)

aspect

Aspect ratio of side lengths x & y (i.e. x/y) in the new rectangle

Value

Returns a numeric vector containing the side lengths c(x, y) of a transformed rectangle with preserved area

Examples

1
2
elongate(10, 100)
elongate(c(5, 125), 4)

kindisperse documentation built on July 28, 2021, 5:09 p.m.