get_attrs_ID: Get the amount of attributes and their IDs

Description Usage Arguments Value References See Also Examples

Description

Allows the user to know how many different attributes there are in the data.frame or table. The number of attributes comes directly from the number of categories that a user can manipulate in a given product configurator. The function assumes that all attribute IDs are in a single column with the name $atid. It also assumes, that all users interacted with the same amount of attributes.

Usage

1
get_attrs_ID(dataset)

Arguments

dataset

the data.frame you want to input.

Value

a vector of integers representing all existing attribute IDs.

References

ProductConfig Github page: https://github.com/avilesd/productConfig

See Also

Other GetFunctions: benefitToCostAttr, getAllUserIds, getAttrValues, getDefaultRefps, getRoundsById, getTableById, normalize

Examples

1
2
get_attrs_ID(my_data) #Example return: [1] 1 2 3 4 , meaning there are 4 attributes on my_data with ascending indexes.
get_attrs_ID(bad_data)

avilesd/productConfig documentation built on May 11, 2019, 4:08 p.m.