management_df_from_excel {SoilManageR} | R Documentation |
Import management_df from excel file
Description
This function imports management data from an excel template and transforms it into a management_df. Additionaly, it checks if all columns that are expected for a managment_df are available. The excel template can be found in the SoilManageR Package under inst/extdata/SoilManageR_mgmt_data_template. Optionaly, the parameter year can be overwritten by the year extracted from date.
Usage
management_df_from_excel(
path_to_xlsx,
var_sheet = "Management_template",
overwrite_year = TRUE
)
Arguments
path_to_xlsx |
path to the excel file with the management data |
var_sheet |
name of the sheet with the management data template in the excel sheet, default is "Management_template" |
overwrite_year |
logical: if TRUE (default), the year will be set to the year extracted from the date |
Value
a management_df
See Also
-
management_df()
for creating an management_df -
check_management_df()
to check the integrity of a management_df
Examples
#create path
path_to_xlsx_template <- system.file(
"/extdata/SoilManageR_mgmt_data_template_V2.6.xlsx", package = "SoilManageR")
#load management_df
management_df_from_excel(path_to_xlsx_template)
[Package SoilManageR version 1.1.0 Index]