diag_hisafe_monthcells: Plot monthCells diagnostics of Hi-sAFe output

Description Usage Arguments Details Value See Also Examples

View source: R/diagnostics.R

Description

Creates three tile plots of every Hi-sAFe monthCells output variable, one plot for each possible plot_hisafe_monthcells facet scheme. All plots are saved as png files to a specifified output path.

Usage

1
2
3
4
5
6
7
8
diag_hisafe_monthcells(
  hop,
  output.path = NULL,
  schemes = c("year.simname", "month.simname", "month.year"),
  trees = TRUE,
  canopies = TRUE,
  tree.simus = FALSE
)

Arguments

hop

An object of class "hop" or "face" containing output data from one or more Hi-sAFe simulations.

output.path

A character stting indicating the path to the directory where plots should be saved. Plots are saved in a subdirectory within this directory named /monthCells/facetScheme. If no value is provided, the experiment/simulation path is read from the hop object, and a directory is created there called "analysis/diagnostics".

schemes

A character vector of the facet schemes to run. Possible schemes are described in Details and have the following names: year.simname, month.simname, month.year.

trees

Logical indicating if a point should be plotted at the location of each tree.

canopies

Logical indicating if an elipsoid should be plotted representing the size of each tree canopy.

tree.simus

Logical indicating whether only simulations containing trees should be plotted.

Details

The default data presentation for each of the facet schemes is: Year~SimulationName plots are for Month==6, every 5 years from 0:max, and all simulations. Month~SimulationName plots are for Year==median, all 12 months, and all simulations. Month~Year plots are for all 12 months and every 5 years from 0:max, with each simulation in its own plot.

Value

Invisibly returns a list of ggplot objects, grouped into two sublists based on the faceting scheme. The first sublist contains Year~SimulationName, and the second contains Month~SimulationName.

See Also

Other hisafe diagnostic fucntions: diag_hisafe_annualcells(), diag_hisafe_cells(), diag_hisafe_ts(), diag_hisafe_voxels()

Examples

1
2
3
4
5
6
7
8
## Not run: 
# After reading in Hi-sAFe simulation data via:
mydata <- read_hisafe(path = "mydir", simu.names = "MySimulation")

# You can create tile plots of every monthCells variable:
diag_hisafe_monthcells(mydata)

## End(Not run)

kevinwolz/hisafer documentation built on Oct. 19, 2020, 4:43 p.m.