View source: R/run_sl_advanced.R
| validate_sl_output | R Documentation |
Performs structural and internal consistency checks on an object
returned by run_sl_advanced() or run_sl().
validate_sl_output(x)
x |
Object expected to inherit from class |
This function is called internally at the end of a simulation to ensure that the returned object is valid and complete before being provided to the user.
The function checks that:
The object inherits from class "sl_output".
Top-level components $output and $input exist.
$output$light contains trees, cells, and sensors.
These elements are data.frames.
Required identifier and energy columns are present.
Energy-related columns are numeric.
If detailed outputs were requested, the presence and structure of
$output$monthly_rays and $output$interceptions
are also verified when available.
Invisibly returns TRUE if validation passes.
Stops with an informative error message otherwise.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.