ManagementData | R Documentation |
Management Data Class
Management Data Class
Data structure that contains management data which can serve as input to a ModvegeSite simulation run.
management_file
string The file that was read.
is_empty
boolean Used to determine if management data is present or not. In the latter case, ModvegeSite will simulate management decisions automatically.
years
List of unique years for which data is available.
cut_years
numeric Vector of length N where N is the total number of cuts read from the input file. Gives the year in which corresponding cut was made.
cut_DOY
numeric Vector of length N giving the day of year (as an integer) on which a cut was made.
intensity
string Management intensity for "autocut". One of c("high", "middle", "low").
new()
Create a new ManagementData object.
ManagementData$new(management_file = NULL, years = NULL)
management_file
string Path to file containing the management data to be read.
years
numeric Vector of years for which the management is to be extracted.
read_management()
Read management data from supplied management_file.
ManagementData$read_management(management_file, years = NULL)
management_file
Path to or name of file containing management data.
years
Years for which the management is to be extracted. Default (NULL) is to read in all found years.
None The object's field are filled.
ensure_file_integrity()
Check that all required columns are present and that cut DOYs are only increasing in a given year.
ManagementData$ensure_file_integrity(cut_data)
cut_data
data.frame containing the cut data.
get_management_for_year()
Extract management data for given year
This simply filters out all data not matching year and returns a list with the relevant keys.
ManagementData$get_management_for_year(year)
year
integer Year for which to extract management data.
M A list containing the keys:
boolean Used to determine if management data is present or not. In the latter case, ModvegeSite will simulate management decisions automatically.
numeric Vector of length N where N is the total number of cuts for this year, as read from the input file. Gives the year in which corresponding cut was made.
numeric Vector of length N giving the day of year (as an integer) on which a cut was made.
string Management intensity for "autocut". One of c("high", "middle", "low").
integer Number of cuts occurring in given year.
The two vectors in cut_DOY
and cut_years
differ from this object's respective fields in that only data for
selected year is present.
clone()
The objects of this class are cloneable with this method.
ManagementData$clone(deep = FALSE)
deep
Whether to make a deep clone.
ManagementData$read_management()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.