Learn R Programming

nhlapi (version 0.1.4)

nhl_drafts: Retrieve metadata on NHL drafts from the API

Description

Retrieve metadata on NHL drafts from the API

Usage

nhl_drafts(draftYears = NULL)

Arguments

draftYears

integer(), vector of one or more years in YYYY format or NULL (default) for the current year's draft. Also accepts a character vector of years in YYYY format.

Value

data.frame, with information on drafts, one row per draft year.

Examples

Run this code
# NOT RUN {
  # Get information on current draft
  nhl_drafts()

  # Get information on 3 historical drafts
  nhl_drafts(2015:2017)
# }

Run the code above in your browser using DataLab