Learn R Programming

welo (version 0.1.4)

welo_plot: Plot for WElo and Elo rates

Description

Plots WElo and Elo rates.

Usage

welo_plot(x, players, rates = "WElo", SP = 1500, line_width = 1.5)

Value

A ggplot2 plot

Arguments

x

An object of class 'welo', obtained after running the welofit function

players

A character vector including the players whose rates will be plotted. The indication of the player has to be: 'Surname N.'. For instance, 'Roger Federer' will be included in the 'players' vector as 'Federer R.'

rates

optional Rates to be plotted. Valid choices are 'WElo' (by default) and 'Elo'

SP

optional Starting points from which the rates originate. By default, SP is 1500

line_width

optional Line width, by default it is 1.5

Examples

Run this code
db<-tennis_data("2022","ATP") 
db_clean<-clean(db,MNM=5)
res_welo<-welofit(db_clean)
players<-c("Nadal R.","Djokovic N.","Berrettini M.","Sinner J.")
welo_plot(res_welo,players,rates="WElo",SP=1500,line_width=1.5)

Run the code above in your browser using DataLab