y_player_stats: Get player stats data from Yahoo! Fantasy API.

View source: R/y_player_stats.R

y_player_statsR Documentation

Get player stats data from Yahoo! Fantasy API.

Description

Want stats for a player or group of players? Provide a vector of player keys and ye shall receive.

Usage

y_player_stats(
  player_key = NULL,
  token_name = NULL,
  game_date = NULL,
  debug = FALSE,
  quiet = TRUE
)

Arguments

player_key

Vector of player keys. Key usually in the form xxx.p.xxxx. Found with 'y_players()', 'y_player_slate()' or 'y_rosters()'

token_name

Name used for assignment when creating token object with 'y_create_token()'.

game_date

Date or week of fantasy season. Default NULL will return aggregate stats for current season. Accepts a vector of dates.

debug

Returns a list of data such as uri call and content. Useful for debugging.

quiet

Print function activity.

Details

Want stats for a specific date? Provide a vector of game dates in form YYYY-MM-DD ( Default game date NULL will return aggregate stats for the season. For weekly sports such as nfl you can provide an integer denoting a fantasy week.

Value

A tibble.


macraesdirtysocks/YFAR documentation built on March 20, 2022, 2:07 a.m.