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.
## ------------------------------------------------ ## Method `Team$new` ## ------------------------------------------------ fpl <- FPL$new() team <- fpl$get_team(11) ## ------------------------------------------------ ## Method `Team$get_players` ## ------------------------------------------------ team$get_players()#> Error in order(player_id): argument 1 is not a vector