[Bug]: Error in arrange()
: In argument: ..1 = stat
. Caused by error: #> ! ..1
must be a vector, not a function, appearing when using plot_pizza "custom" comparison.
#123
Labels
bug
Something isn't working
What happened?
ggshakeR version: 0.2.090
R version: 2023.08.0 - daily-170
I tried to make a custom comparison graph but it was not possible due to an error, i have followed every step in the tutorial but i could not figure it out.
is there any fix to it? is it the code or the function is not working properly?
i am using the daily build of r to avoid the CacheKey error present in the 2023.06 build.
library(worldfootballR)
library(ggshakeR)
library(reprex)
#> Warning: package 'reprex' was built under R version 4.2.3
library(worldfootballR)
library(ggshakeR)
data1 <-fb_player_scouting_report("https://fbref.com/en/players/65159211/Yuri-Alberto", pos_versus = "primary")
data2 <- fb_player_scouting_report("https://fbref.com/en/players/2e5e846d/Deyverson", pos_versus = "primary")
data1 <- data1[c(345,338,301,377,394,386,387,402,393,395), ]
data2 <- data2[c(210,203,166,242,259,251,252,267,258,260), ]
data <- rbind(data1, data2)
graph <- plot_pizza(data = data, type = "comparison", template = "custom",
player_1 = "Deyverson", player_2 = "Yuri Alberto",
season_player_1 = "2023 Série A",
season_player_2 = "2023 Série A",
color_compare = "#c1ef01", theme = "black")
#> Error in
arrange()
:#> ℹ In argument:
..1 = stat
.#> Caused by error:
#> !
..1
must be a vector, not a function.#> Backtrace:
#> ▆
#> 1. ├─ggshakeR::plot_pizza(...)
#> 2. │ └─data1 %>% arrange(desc(stat), desc(Percentile)) %>% ...
#> 3. ├─dplyr::mutate(., Statistic = factor(Statistic, levels = Statistic))
#> 4. ├─dplyr::arrange(., desc(stat), desc(Percentile))
#> 5. ├─dplyr:::arrange.data.frame(., desc(stat), desc(Percentile))
#> 6. │ └─dplyr:::arrange_rows(.data, dots = dots, locale = .locale)
#> 7. │ ├─dplyr::mutate(data,
:=
("{name}", !!dot), .keep = "none")#> 8. │ └─dplyr:::mutate.data.frame(data,
:=
("{name}", !!dot), .keep = "none")#> 9. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
#> 10. │ ├─base::withCallingHandlers(...)
#> 11. │ └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
#> 12. │ └─mask$eval_all_mutate(quo)
#> 13. │ └─dplyr (local) eval()
#> 14. ├─dplyr:::dplyr_internal_error("dplyr:::mutate_not_vector",
<named list>
)#> 15. │ └─rlang::abort(class = c(class, "dplyr:::internal_error"), dplyr_error_data = data)
#> 16. │ └─rlang:::signal_abort(cnd, .file)
#> 17. │ └─base::signalCondition(cnd)
#> 18. └─dplyr (local)
<fn>
(<dpl:::__>
)#> 19. └─rlang::abort(message, class = error_class, parent = parent, call = error_call)
graph
#> Error in eval(expr, envir, enclos): objeto 'graph' não encontrado
ggsave("comparacao.png", bg = "black", width = 2900, height = 2800, units = "px")
#> Error in ggsave("comparacao.png", bg = "black", width = 2900, height = 2800, : não foi possível encontrar a função "ggsave"
The text was updated successfully, but these errors were encountered: