filter_per_player_clutch: Generate filters for a 'per player' data query.

Description Usage Arguments Details Value See Also Examples

Description

Creates a list of key-value pairs from the supplied arguments for use in per_player_agg with argument clutch=TRUE; and inserts default values for any filters not specified in the call to the function.

Usage

1

Arguments

...

List of key-value pairs to use as filters in a query to the per-player data endpoint of stats.nba.com. The basix key-values are described in filter_per_player. The additional clutch-related key-value pairs are described here with default values indicated in brackets:

clutch_time

Number of seconds left in game: 300, 240, ..., 60, 30, 10 (300)

lead

Whether the team is ahead or behind (incl. tied): 'any', 'ahead', 'behind' ('any')

point_diff

The size of the point differential: 1–5 (5)

Details

This function is the same as the filter_per_player function with the addition of the filters to determine what ‘clutch’ time is.

Value

A list of key-value pairs for passing to the per-player data query function per_player_agg with argument clutch=TRUE.

See Also

per_player_agg filter_per_player

Examples

1
2
3
4
5
## Not run: 
  fppc <- filter_per_player_clutch(league='NBA', clutch_time=300)
  ppd <- per_player_agg(filters=fppc, clutch=TRUE)

## End(Not run)

stephematician/statsnbaR documentation built on May 30, 2019, 3:17 p.m.