create_matrix {pioneeR} | R Documentation |
Create a matrix for input or output variables
Description
Create a matrix for input or output variables that can be used in DEA models from a supplied data.frame
Usage
create_matrix(df, columns, id, normalize = FALSE)
Arguments
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 |
Value
A matrix of inputs or outputs
Examples
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)
[Package pioneeR version 0.5.0 Index]