Learn R Programming

oppr (version 1.0.4)

feature_names: Feature names

Description

Extract the names of the features in an object.

Usage

feature_names(x)

# S4 method for ProjectProblem feature_names(x)

Value

character feature names.

Arguments

x

ProjectProblem.

Examples

Run this code
# load data
data(sim_projects, sim_features, sim_actions)

# build problem with default solver
p <- problem(sim_projects, sim_actions, sim_features,
             "name", "success", "name", "cost", "name") %>%
     add_max_richness_objective(budget = 200) %>%
     add_binary_decisions() %>%
     add_default_solver()

# print problem
print(p)

# print feature names
feature_names(p)

Run the code above in your browser using DataLab