Skip to contents

Coerce to a dea_data object

Usage

as_dea_data(x, ...)

Arguments

x

A dea_data object, or a data frame passed on to dea_data.

...

Passed to dea_data when x is not already a dea_data object.

Value

A dea_data object.

Examples

df <- data.frame(city = c("A", "B"), i_x = c(4, 7), o_y = c(5, 8))
d <- as_dea_data(df)   # coerces a data frame to dea_data
as_dea_data(d)         # already a dea_data: returned unchanged
#> <dea_data>
#>   DMUs    : 2
#>   Inputs  : 1 (x)
#>   Outputs : 1 (y)