Skip to content
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

[pt] another attemt to fix item sorting #912

Merged
merged 1 commit into from
Jan 24, 2024
Merged

[pt] another attemt to fix item sorting #912

merged 1 commit into from
Jan 24, 2024

Conversation

JanMarvin
Copy link
Owner

@JanMarvin JanMarvin commented Jan 24, 2024

Apparently #842 was not yet sufficient. second part of #909

library(openxlsx2)
dd <- data.frame(Foo = sample(0:1, 26, TRUE), foo2 = letters, bar = TRUE)
wb <- wb_workbook()$add_worksheet()$add_data(x = dd)
pt <- wb_data(wb)

# so how am I supposed to order this?
wb$
  add_pivot_table(pt, rows = "foo2", data = "bar",
                  pivot_table = "pt1",
                  params = list(
                    sort_item = list(foo2 = c("b", "e", "d"))
                  ))$
  add_slicer(pt, slicer = "foo2", pivot_table = "pt1", dims = "A10",
             params = list(
               choose = c(foo2 = 'x %in% c("b", "e", "d")')
             ))

if (interactive()) wb$open()

@JanMarvin JanMarvin force-pushed the pt_sort_item branch 2 times, most recently from 6073575 to 8152a58 Compare January 24, 2024 22:44
@JanMarvin JanMarvin merged commit a5282f1 into main Jan 24, 2024
9 checks passed
@JanMarvin JanMarvin deleted the pt_sort_item branch January 24, 2024 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant