#' total goals a player has scored with right foot, left-foot or header
#'
#' @param id player_id
#' @return a dataframe of goals by scoring method
#' @importFrom magrittr %>%
#' @importFrom dplyr filter left_join inner_join count
#' @examples
#' player_scoring_method("KANEH")
#' player_scoring_method("SHEAREA")
#' @export
player_scoring_method <- function(id) {
players %>%
filter(player_id==id) %>%
left_join(player_team) %>%
left_join(player_game) %>%
inner_join(goals) %>%
count(method)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.