create_matrix | R Documentation |
Create a matrix for input or output variables that can be used in DEA models from a supplied data.frame
create_matrix(df, columns, id, normalize = FALSE)
df |
A data.frame containing the data. |
columns |
A character vector of column names to include in the matrix. |
id |
A character string specifying the column with DMU IDs. |
normalize |
A logical indicating whether to normalize the columns by their
mean. Defaults to |
A matrix of inputs or outputs
df <- data.frame(id = 1:3, a = c(10, 20, 30), b = c(5, 15, 25))
create_matrix(df, columns = c("a", "b"), id = "id", normalize = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.