lauken13/mrpkit

QuestionMap should allow dataframe as argment to `values_map`

mitzimorris opened this issue · 3 comments

specifying the argument values_map as a list of "tag" = "value" pairs can be tedious.
currently SurveyQuestion requires that the input is a named list (i.e., a pairslist).
this is an internal data structure in R.
it took me quite a bit of digging to understand how this works and where it's used.
I suspect other users will also have problems.

since the SurveyQuestion object converts this to a dataframe anyhow, we should allow users
to supply either a list or a dataframe as this argument.

since the SurveyQuestion object converts this to a dataframe anyhow, we should allow users
to supply either a list or a dataframe as this argument.

that seems reasonable

It was initially a data frame but the group feedback suggested it was not intuitve to expect users to create a data frame.

Regardless, if we do allow this, we'll need to document the column names. Suggest "survey" and "population"

agreed that dataframes are heavy and clunky for a small number of categories and the "tag" = "value" is very nice.
we need both.