Budget_Import_Constraint imports the Budget Constraint's data from a sheet in an excel file.
Everytime used, it will add a member to a list named
Budget which will store the budget constraints.
(For more information, refer to Budget_Add_Constraint)
A string: the location and name of the excel file.
A string: the name of the sheet holding the budget constraint data. (Default: "Budget")
A double: defining the budget limit (right-hand-side). If
A binary parameter: if
the environment where the package should create or access variables. By default the package works in the R's Global environment. (Default: .GlobalEnv)
The first row of the sheet will be ignored as captions. The first column of the sheet should have names of parcels in the constraint,
and the second column should have the parcels' respective coefficients.
The Budget Limit can be passed as a Parameter when calling the
Budget_Import_Constraint, for instance
Limit = NULL, the function will look for a row named "Limit" in the input sheet and use its value as the constraints limit.
Here is an example Budget constraint table:
Removing a budget: Budget
i can be removed using the following code:
Removing all budget constraints: All budget constraints can be removed using the following code:
NULL (creates some variables in the environment but returns nothing)
Other Budget Constraints:
1 2 3 4 5 6 7 8 9 10 11 12 13
## Not run: ## To read the data and import the budget limit from the excel file ## Budget_Import_Constraint("C:\\example.xlsx", Sheet= "Budget", Limit= NULL) ## To read the data from excel file, and put the Budget limit equal to 60. (It will ignore the limit defined in the excel file) ## Budget_Import_Constraint("C:\\example.xlsx", Sheet= "Budget", Limit= 60) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.