View source: R/Risk_Objective.R
Risk_Objective_Create | R Documentation |
Risk_Objective_Create
creates the problem's Risk objective function.
It creates a list named Risk_Objective
, where Risk_Objective[["Sigma"]]
stores the the sigmas of parcels, and
Risk_Objective[["Correlation"]]
stores the the Correlation of parcels.
This function is not sensitive to the order the parcels are stored in the sheet and will automatically store parcels sorted with the same order they were stored in Parcels
.
Risk_Objective_Create(Parcels, Sigma, Correlation,
Silence=FALSE, Env= .GlobalEnv)
Parcels |
A vector of strings: the name of the parcels appearing in the objective |
Sigma |
A vector of doubles: the respective sigmas of the parcels in |
Correlation |
A matrix of doubles: a symmetric matrix with diogonal elements equal to one.
The element in |
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) |
NULL (creates some variables in the environment but returns nothing)
Other Risk Objective:
Risk_Objective_Import()
Other Objective Creators:
First_Objective_Create()
,
Second_Objective_Create()
## Not run:
Risk_Objective_Create(Parcels = c("Parcel_1","Parcel_2","Parcel_3"),
Sigma = c(1,2,3),
Correlation = cbind(c(1,0.5,-0.7),c(0.5,1,0.2),c(-0.7,0.2,1)))
## Correlation matrix in this example is
| +1.0 | +0.5 | -0.7 |
| +0.5 | +1.0 | +0.2 |
| -0.7 | +0.2 | +1.0 | ##
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.