Learn R Programming

ForestElementsR (version 2.0.1)

get_area_ha: Get the Area in ha of a Compatible Object

Description

The function get_area_ha will return the correct area for all appropriate objects provided by ForestElementsR. While the fe_stand class contains this information directly, this is not the case for the fe_stand_spatial class. However, get_area_ha will work for both (and other objects to be implemented) in the same way. In case the object x does not contain sufficient information, the function returns NULL.

Usage

get_area_ha(x)

Value

The object's area in ha. In case the object x does not contain sufficient information, the function returns NULL.

Arguments

x

Object provided by ForestElementsR for which an area can be meaningfully given, typically fe_stand or fe_stand_spatial

Examples

Run this code
# Example for an fe_stand object
selection_forest_1_fe_stand |> get_area_ha()

# Example for an fe_stand_spatial object
mm_forest_1_fe_stand_spatial |> get_area_ha()

Run the code above in your browser using DataLab