Learn R Programming

YplantQMC (version 0.6-3)

makeStand: Make a stand of virtual plants

Description

Make a stand of plants, for use in runYplant, and for visualization. See the example below to get started. Support for runYplant is somewhat experimental, and YplantDay is not supported yet. Proceed at your own risk.

Usage

makeStand(plants = list(), xyz = data.frame(x = 0, y = 0, z = 0),
  plotbox = NULL)

Arguments

plants
List of plants to be placed in the stand.
xyz
Data frame (or matrix) with x,y,z locations of the stem positions of the plants.
plotbox
Optional. Plot boundary, used for scaling-up purposes.

Value

  • An object of class stand3d, methods exist for print, plot, runYplant. And soon, YplantDay.

Details

The xyz argument must be a dataframe or matrix with three columns, and it is assumed to be in the order X,Y,Z. The plotbox argument is optional, if it is not provided the plot boundary will be as a rectangle that just fits around the projected crown area. In some cases, the base of the stem can thus fall outside the plot boundary. For now, the plot boundary is only used to calculate the leaf area index, which has no bearing on any simulation results.

Examples

Run this code
# Make a stand consisting of three 'toona' plants.
toonastand <- makeStand(list(toona,toona,toona),
                       xyz=data.frame(x=c(0,200,100),
                                      y=c(50,50,300),
                                      z=c(0,0,0)))

# The print method shows a very short summary:
toonastand

# Plot the stand
plot(toonastand)

Run the code above in your browser using DataLab