Converts choice data from long to wide format, with one row per observation as opposed to one row per alternative/observation.
apollo_longToWide(longData, longToWide_settings)
Silently returns a data.frame with the wide format version of the data. An overview of the data is printed to screen.
data.frame. Data in long format.
List. Contains settings for this function. User input is required for all settings.
alternative_column
: Character. Name of column in long data that contains the names of the alternatives (either numeric or character).
alternative_specific_attributes
: Character vector. Names of columns in long data with attributes that vary across alternatives within an observation.
choice_column
: Character. Name of column in long data that contains the choice.
ID_column
: Character. Name of column in long data that contains the ID of individuals.
observation_column
: Character. Name of column in long data that contains the observation index.