skiadas / PanthR

Statistics front-end and webserver with R connection
1 stars 2 forks source link

Panel Variables and Panel Placement #22

Open skiadas opened 11 years ago

skiadas commented 11 years ago

A lot of Output Objects include panel variables, which are used as a "Split File" in SPSS to show the analysis separately for each value combination of those panel variables. Currently these are stored in an array under the panel_variables key, while a separate array under the panel_placement key indicates how those variables are to be incorporated into the structure. For instance a placement of "row" for a variable means that that variable's values should create separate chunks down the rows (similar to the Row Panel Variable feature in SPSS), a placement of "column" would mean they would create separate chunks across the columns (similar to the Column Panel Variable feature in SPSS), and a placement of "panel" would mean that whole different tables/graphs would be generated (similar to the effect of Split File in SPSS).

Functionally all these achieve the same goal so it makes sense for them to all be called panel variables. My question is this: Is it better to keep those as two separate keys, or should we somehow incorporate the placement into variables. For example we could have one key, called panel_variables, that looks something like this:

[ { name: "foo", placement: "row"}, { name: "bar", placement: "column"}, .... ]

there are probably other alternatives.