getPlayerDataHA: Return the CSV file and a dataframe of a player's matches...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/getPlayerDataHA.R

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

1
2
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

1
2
3
4
5
6
7
8
9
## 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)

cricketr documentation built on March 23, 2021, 9:06 a.m.