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

elongate

Change the shape (aspect ratio) of a rectangle while preserving area


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

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

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

kindisperse

Simulate and Estimate Close-Kin Dispersal Kernels

v0.10.1
MIT + file LICENSE
Authors
Moshe-Elijah Jasper [aut, cre] (<https://orcid.org/0000-0003-4541-3223>)
Initial release

We don't support your browser anymore

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