Construct and validate utility objects.
The utility class
A utility object contains is an object that meets the following criteria:
It contains a column that acts as a unique respondent identifier and another that identifies different surveys over time.
It contains additional columns that represent the country, type and value of a utility that has previously been calculated.
Together, Each combination of respondent identifier, survey identifier, utility country and utility type should be unique and not duplicated across rows.
Arguments
- x
[data.frame]
.- respondentID
[character]
Unique respondent identifier. The name of a variable inx
that uniquely identifies respondents.- surveyID
[character]
Name of variable inx
that uniquely identifies surveys over time. To avoid ambiguity the specified variable must be either numeric or a factor (in which case the order will be taken as that given by the factor levels).- country
[character]
Name of variable inx
representing the utility country.- type
[character]
Name of variable inx
representing the utility country.- value
[character]
Name of variable inx
representing the utility value.- xx
An R Object to validate.