I tried to find any example related to this topic but didn't find any clear answer. Issue related to this was asked and closed a year ago. Sorry, I didn't find anything useful on that blog.
Firstly, I'm trying to hide a specific variable from drag and drop panels while constructing a pivot table. Secondly, I want to use a specific variable as an aggregator and remove all rest of the variables from the aggregator list.
Note: I don't want to remove that variable from the data frame. Options for example rows, cols, vals, aggregatorName, rendererName are working perfectly. But hiddenFromDragDrop and hiddenFromAggregators are not working, or I'm using them in wrong way.
My data is too big. An example code to clear my question is given here. This data has 4 variables, Eye, Sex, Hair, and Freq. I want to hide "Freq" from the DragDrop list and "Eye","Hair","Sex" from aggregator attribute list. I'm looking for a working example. I'll appreciate your help. Thank you.
library(rpivotTable)
data(HairEyeColor)
rpivotTable(data = HairEyeColor, rows = "Hair",cols="Eye", vals = "Freq",
aggregatorName = "Sum", rendererName = "Table",
hiddenFromDragDrop="Freq",hiddenFromAggregators=c("Eye","Hair","Sex"), width="100%", height="400px")