Import_data | R Documentation |
Import_data
imports the problem's data from an excel file.
The excel file must include a sheet named "Parcels" providing names of all parcels in the problem and their status.
If any of the sheets named "First_Objective", "Second_Objective", "Sigma", and "Correlation" exist in the excel file, the function will automatically import the data from them.
Note: The sheets in the excel file must follow the structures explained in the functions in See Also
section.
Import_data(Address, First_Objective_Sense= "Min",
Second_Objective_Sense="Min", Silence= FALSE, Env= .GlobalEnv)
Address |
A string: the location and name of the excel file. |
First_Objective_Sense |
A string: "Min" means the objective is to be minimized and "Max" means the objective is to be maximized. (Default: "Min") |
Second_Objective_Sense |
A string: "Min" means the objective is to be minimized and "Max" means the objective is to be maximized. (Default: "Min") |
Silence |
A binary parameter: if |
Env |
the environment where the package should create or access variables. By default the package works in the R's Global environment. (Default: .GlobalEnv) |
Based on the sheets available, Import_data
will automatically call different functions.
If "Parcels" exists, the function Parcels_Import will be called. It will create
variables Parcels
representing the name of parcels and the order they are used,
and Status
showing which parcel is or is not protected (owned).
(For more information refer to function Parcels_Import)
If "First_Objective" exists, the function First_Objective_Import will be called, which will create
a list named First_Objective
. First_Objective[["Coefficients"]]
stores the the coefficient of parcels
and First_Objective[["Sense"]]
stores the parameter First_Objective_Sense
showing if the objective is to be minimized or maximized.
(For more information refer to function First_Objective_Import)
If "Second_Objective" exists, the function Second_Objective_Import will be called, which will create
a list named Second_Objective
. Second_Objective[["Coefficients"]]
stores the the coefficient of parcels
and Second_Objective[["Sense"]]
stores parameter Second_Objective_Sense
showing if the objective is to be minimized or maximized.
(For more information refer to function Second_Objective_Import)
If both "Sigma" and "Correlation" exist, the function Risk_Objective_Import will be called.
It will creat a list named Risk_Objective
will be created,
where Risk_Objective[["Sigma"]]
stores the the sigmas of parcels,
Risk_Objective[["Correlation"]]
stores the the Correlation of parcels.
(For more information refer to function Risk_Objective_Import)
NULL (creates some variables in the environment but returns nothing)
Other Import Functions:
First_Objective_Import()
,
Parcels_Import()
,
Risk_Objective_Import()
,
Second_Objective_Import()
## Not run:
Import_data(Address= "C:\\Folder\\example.xlsx",
First_Objective_Sense= "Max", Second_Objective_Sense="Max")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.