getTeamData {cricketr}R Documentation

Get the data for a team in a match type viz.for Test, ODI and T20

Description

This function returns team data as a CSV file and/or a dataframe for Test, ODI and T20

Usage

getTeamData(dir=".",file="team001.csv",matchType="Test",
        homeOrAway=c(1,2,3),result=c(1,2,3,4),teamView="bat",save=FALSE,teamName)

Arguments

dir

The directory where the team data CSV file be saved

file

The name of the CSV file to save to

matchType

The match type - Test, ODI , T20

homeOrAway

Whether the data has to be got for home-1, away(overseas)-2 or neutral -3

result

The result of the match for which data is to be saved - won-1, lost -2, tied-3, draw-4

teamView

This can be 'bat' - batting team or 'bowl' - bowling team

save

This can be set as TRUE or FALSE

teamName

This is team name

Value

The required data frame

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=getTeamData(dir=".",file="australia.csv", matchType="Test",homeOrAway=c(1,2,3),
       result=c(1,2,3, 4),teamView='bat',teamName="Australia")

## End(Not run)

[Package cricketr version 0.0.26 Index]