Description Usage Arguments Note Author(s) Examples
This function retrieves the oldest NBA player in a particular year.
1 | get_oldest(year)
|
year |
Need to load the Seasons_Stats_NBA dataset from https://www.kaggle.com/drgilermo/nba-playe-stats#Seasons_Stats.csv for this funtction to work.
Allison De Jong
1 2 3 4 5 6 7 8 9 10 11 12 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (year)
{
x <- select(dNBA, Year, Player, Age) %>% filter(Year == year) %>%
arrange(desc(Age), Player) %>% select(Player)
result <- as.list(x$Player) %>% pluck(1)
return(result)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.