penaltyPrint {footballpenaltiesBL}R Documentation

Show a table of all penalties taken by or against a men's Bundesliga player.

Description

Search for a player – either exact match or using fixed regular expressions – and return all penalties taken by or against this player as table.

Usage

penaltyPrint(player, goalkeeper = TRUE, exact = TRUE, pendat, includeMisses = TRUE)

Arguments

player

Character vector of length 1 which contains the full name of a player in pendat or a part thereof.

goalkeeper

Boolean, specifies whether player is searched for among goalkeepers (TRUE) or penalty takers (FALSE).

exact

Boolean, specifies whether to look for an exact match. If set to FALSE, grep(player, fixed = TRUE) is used to search for the player.

pendat

Name of a data set containing the penalties. The data set needs to follow the format of penalties.

includeMisses

Boolean, indicates whether to include penalties that missed the goal without the goalkeeper actively saving the ball.

Value

Returns a data.frame that is a subset of pendat.

Author(s)

Leo N. Geppert

See Also

penaltyPlot

Examples

data(penalties)
penaltyPrint('Illgner, Bodo', pendat = penalties)
penaltyPrint('Illgner', exact = FALSE, pendat = penalties)

[Package footballpenaltiesBL version 1.0.0 Index]