Skip to content

Commit

Permalink
try to fix d3_party() for new tidyr::nest() api
Browse files Browse the repository at this point in the history
  • Loading branch information
timelyportfolio committed Oct 2, 2023
1 parent 4044fa7 commit b476349
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/party.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ d3_party = function (tree=NULL, json=TRUE) {
)
colnames(counts) <- c("fitted", "response", "freq")
counts$fitted = as.numeric(as.character(counts$fitted))
counts <- tidyr::nest(counts, data=c(rlang::.data$response, rlang::.data$freq))
counts <- tidyr::nest(counts, .by = `fitted`)
# would use dplyr join here, but nested data.frame
# flattened on join; this does not happen with nested
# tibble, but don't want to add another depedency
Expand Down

0 comments on commit b476349

Please sign in to comment.