GetArrow {wflo}R Documentation

Simple helper function for PlotResult.

Description

Given a point, an angle information (in arithmetic degrees), and a length information, computes start and end points of an arrow usable via the arrows function.

Usage

GetArrow(BaseX, BaseY, Degrees, Frac = 25)

Arguments

BaseX

must be a single value containing the x value of a point which later will be the center of the arrow.

BaseY

must be a single value containing the y value of a point which later will be the center of the arrow.

Degrees

must be a single value containing the desired rotation degree of the arrow.

Frac

must be a single value containing the length of the arrow. Default is 25 and for convenience, this parameter should in most cases be identical to FarmVars$Width.

Details

This function will be used internally by PlotResult.

Value

GetArrow returns a vector of four values representing x and y for the start point and x and y for the end point of an arrow (in that order).

Author(s)

Carsten Croonenbroeck

See Also

Use PlotResult to visualize the optimization result. See FarmVars for the data object.

Examples

GetArrow(0.5, 0.5, 45)
#At c(0.5, 0.5), generates an arrow pointing in north-eastern direction.

[Package wflo version 1.9 Index]