Description Details Public fields Methods Examples
The [FPL$get_team()] and [FPL$get_teams()] methods return objects of class 'Team'.
Information is taken from <https://fantasy.premierleague.com/api/bootstrap-static/>.
team
A 'data.frame'. Data for a single Premier League team.
players
A 'data.frame'. Player data for a single Premier League team. Empty by default unless the [FPL$get_players()] method is called.
new()
Instantiate the 'Team' class.
Team$new(team)
team
A 'data.frame'. Data for a single Premier League team.
An R6 object of class 'Team'.
fpl <- FPL$new() team <- fpl$get_team(11)
get_players()
Get information about specific players from the 'team'.
Team$get_players()
A 'list' of R6 'Player' objects who play for the 'Team'.
team$get_players()
print()
Pretty printing of the 'Team'.
Team$print(...)
...
Not used.
clone()
The objects of this class are cloneable with this method.
Team$clone(deep = FALSE)
deep
Whether to make a deep clone.
1 2 3 4 5 6 7 8 9 10 11 12 | ## ------------------------------------------------
## Method `Team$new`
## ------------------------------------------------
fpl <- FPL$new()
team <- fpl$get_team(11)
## ------------------------------------------------
## Method `Team$get_players`
## ------------------------------------------------
team$get_players()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.