-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to sort the rows in the PivotTable #69
Comments
This is more involved and can't be done with the quick pivot functions (e.g. qpvt). Example code - sorting by the male value in descending order (highest first):
This generates the following: The values in the "CustomSort" columns always show the calculation value for male, even under the "F" and "Total" column headings. The custom calculation can then be hidden by changing the |
Thank you!! I will try it tomorrow |
pv <- qpvt(data, rows = "party", columns = "gender", calculations = "round(mean(revenu))") pv$sortRowDataGroups(orderBy = "calculation") pv$renderPivot()
This is my code, I want to sort the data by the total "calculation"(revenue mean)belonging to the "male" in the columns "gender"; however, it just can sort by the total "calculation"(revenue mean). How can I fix it?
The text was updated successfully, but these errors were encountered: