Edit variable name (alias in rcrunch's parlance) (CA RENAME)
Edit variable title/description/notes (CA CHANGE)
Recode existing categorical variable categories, can combine categories, change codes, names, numeric_values, missingness and dates (CA REPLACE CATEGORICAL RECODE, or if not changing codes, LABEL / SET NUMERIC VALUE/MISSING/DATE)
Reorder categories (CA REORDER CATEGORIES)
Create a categorical array of existing categorical variables (CA CREATE CATEGORICAL ARRAY)
Create a multiple dichotomy of existing categorical variables, potentially selecting different categories per subvariable (CA CREATE MULTIPLE DICHOTOMY [WITH RECODE])
Organize variables into folders (CA ORGANIZE)
Actions that aren't allowed because I couldn't figure out how to do in crunch automation:
Change which categories are selected in MRs (maybe I could use REPLACE MULTIPLE DICHOTOMY FROM? I didn't try)
Change name (alias) of subvariables (hit bug discussed on slack, haven't checked if it's fixed)
Change order of subvariables (I don't see a command for this)
Actions that aren't allowed because I was having trouble getting them to work and/or ran out of time:
Add/remove subvariables to existing arrays - Mostly just ran out of time, removing would be weird because it'd have to be run first because it's a "schema command"
Change variable type (seems like text/numeric -> categorical are the most useful, and need to think about how to help the user know what categories to expect)
Create new variables besides arrays from existing ones (seems like you might want to eg have two versions of age categories, would be nice if you could do the categorical combination in excel, but then it becomes hard to know what's a rename and what is a new variable. Also, what if you want to make a new variable from one you just created, that makes the code complicated)
If we go down further down this road, this was the last round of suggestions:
Remove code column (and no longer allow recodes)
Add Subtotal column (related to DISPLAY Crunch Automation Command, text in Column R becomes the subtotal name, always positioned on top, categories can belong to at most 1 subtotal, existing subtotals are not imported into the spreadsheet)
Change type to be Cat Array or MR in first column
Use more compact "UNSET NUMERIC VALUE" syntax for variables where the only changes to numeric value are to remove all of them
Still very much a WIP, there are no tests.
Actions that are implemented:
RENAME
)CHANGE
)REPLACE CATEGORICAL RECODE
, or if not changing codes,LABEL / SET NUMERIC VALUE/MISSING/DATE
)REORDER CATEGORIES
)CREATE CATEGORICAL ARRAY
)CREATE MULTIPLE DICHOTOMY [WITH RECODE]
)ORGANIZE
)Actions that aren't allowed because I couldn't figure out how to do in crunch automation:
REPLACE MULTIPLE DICHOTOMY FROM
? I didn't try)Actions that aren't allowed because I was having trouble getting them to work and/or ran out of time: