Learn R Programming

cricketr (version 0.0.26)

getTeamDataHomeAway: Get the data for a team in a match type viz.for Test, ODI and T20 with the home/overseas/neutral

Description

This function returns team data as a CSV file and/or a dataframe for Test, ODI and T20 with an additional column showing home, away or neutral venue where the match was played

Usage

getTeamDataHomeAway(dir=".",teamView="bat",matchType="Test",file="team001HA.csv",
save=TRUE,teamName)

Arguments

dir

The directory where the team data CSV file be saved

teamView

Team view can be either 'bat' (batting team) or 'bowl' (bowling team)

matchType

The match type - Test, ODI , T20

file

The name of te file to save to

save

This can be TRUE or FALSE

teamName

Team name is the team namely - Australia, India, England etc

Value

The required data frame

References

https://www.espncricinfo.com/ci/content/stats/index.html https://gigadom.in/

See Also

teamWinLossStatusVsOpposition teamWinLossStatusAtGrounds plotTimelineofWinsLosses

Examples

Run this code
# NOT RUN {
#Get the team data for India for Tests

getTeamDataHomeAway(teamName="India",file="india.csv")
# }

Run the code above in your browser using DataLab