getPlayerDataHA {cricketr} | R Documentation |
Return the CSV file and a dataframe of a player's matches along with home/away column
Description
This function saves the players data as a CSV file and also returns a data frame. A new column home/away/neutral is added
Usage
getPlayerDataHA(profileNo,tdir=".",tfile="player001.csv",type="batting",
matchType="Test")
Arguments
profileNo |
The profile number of the player |
tdir |
The name of the directory to save the CSV file |
tfile |
The name of the CSV file |
type |
This parameter should be 'batting' for batsman data and 'bowling' for bowlers |
matchType |
Match type - Test, ODI or T20 |
Value
dataframe
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
batsman4s
Examples
## Not run:
#Get data for Tendulkar
df=getPlayerDataHA(profileno=35320,tfile="tendulkarHA.csv")
#Get the bowling data for Jadeja in ODIs
df=getPlayerDataHA(profileNo=234675,tfile="jadejaODIHA.csv",type="bowling",matchType='ODI')
# Get the data for Kohli in T20s for batting
df=getPlayerDataHA(profileNo=253802,tfile="kohliT20HA.csv",matchType="T20")
## End(Not run)
[Package cricketr version 0.0.26 Index]