Long to Wide
Posted: 20 Aug 2024, 08:04
Dear Professors,
I have an issue with transforming my data from the long to the wide format. Below is the code that I have written so far, but the last line where I try to do the actual tranformation does not seem to work.
settings <- list(
alternative_column = "Alt",
alternative_specific_attributes = c("strg_no", "strg_1", "strg_10", "strg_24", "peer_low", "peer_med", "peer_high", "es_yes", "es_no", "invcost"),
choice_column = "choice",
ID_column = "Record",
observation_column = "Q"
)
SOLAR_PV <- apollo_longToWide(SOLAR_PV_BASE, longToWide_settings = settings)
I was wondering if you could help me with what I am doing wrong?
Best regards,
Gabrielle Söderberg
I have an issue with transforming my data from the long to the wide format. Below is the code that I have written so far, but the last line where I try to do the actual tranformation does not seem to work.
settings <- list(
alternative_column = "Alt",
alternative_specific_attributes = c("strg_no", "strg_1", "strg_10", "strg_24", "peer_low", "peer_med", "peer_high", "es_yes", "es_no", "invcost"),
choice_column = "choice",
ID_column = "Record",
observation_column = "Q"
)
SOLAR_PV <- apollo_longToWide(SOLAR_PV_BASE, longToWide_settings = settings)
I was wondering if you could help me with what I am doing wrong?
Best regards,
Gabrielle Söderberg