Learn R Programming

YplantQMC (version 0.6-6)

getangles: Read angles from a .p file.

Description

Reads leaf angles (angle, orientation or azimuth) from a plant file (a Yplant input file with extension .p, known as a pfile).

Usage

getangles(plant, whichangle = "An.3")

Arguments

plant
An object of class plant3d, or the name of a pfile.
whichangle
The name of the angle, in quotes (see modifypfile)

Value

A vector of angles (in degrees).

Details

If the leaf angle is returned (An.3, the default), all angles are converted so that they are between 0 and 90 degrees. A warning is printed when any angle > 360, which may indicate problems in the data (this is uncommon).

Other angles may be read, see modifypfile for a list of the angles in a pfile.

Examples

Run this code


## Not run: 
# # Two options:
# # Get leaf angles from a pfile
# ang <- getangles("someplant.p")
# 
# # Or from a constructed plant:
# myplant <- constructplant("someplant.p","someleaf.l")
# ang <- getangles(myplant)
# ## End(Not run)




Run the code above in your browser using DataLab