teamWinLossStatusVsOpposition {cricketr} | R Documentation |
Compute the wins/losses/draw/tied etc for a Team in Test, ODI or T20 against opposition
Description
This function computes the won,lost,draw,tied or no result for a team against other teams in home/away or neutral venues and either returns a dataframe or plots it against opposition
Usage
teamWinLossStatusVsOpposition(file,teamName,opposition=c("all"),homeOrAway=c("all"),
matchType="Test",plot=FALSE)
Arguments
file |
The CSV file for which the plot is required |
teamName |
The name of the team for which plot is required |
opposition |
Opposition is a vector namely c("all") or c("Australia", "India", "England") |
homeOrAway |
This parameter is a vector which is either c("all") or a vector of venues c("home","away","neutral") |
matchType |
Match type - Test, ODI or T20 |
plot |
If plot=FALSE then a data frame is returned, If plot=TRUE then a plot is generated |
Value
None
Note
Maintainer: Tinniam V Ganesh tvganesh.85@gmail.com
Author(s)
Tinniam V Ganesh
References
https://www.espncricinfo.com/ci/content/stats/index.html
https://gigadom.in/
See Also
teamWinLossStatusVsOpposition
teamWinLossStatusAtGrounds
plotTimelineofWinsLosses
Examples
## Not run:
#Get the team data for India for Tests
df <- getTeamDataHomeAway(teamName="India",file="indiaOD.csv",matchType="ODI")
teamWinLossStatusAtGrounds("india.csv",teamName="India",opposition=c("Australia","England","India"),
homeOrAway=c("home","away"),plot=TRUE)
## End(Not run)