# NOT RUN {
# Both home and away. Result = won,lost and drawn
tendulkar <-getPlayerData(35320,dir="../cricketr/data", file="tendulkar1.csv",
type="batting", homeOrAway=c(1,2,3),result=c(1,2,4))
# Only away. Get data only for won and lost innings
tendulkar <-getPlayerData(35320,dir="../cricketr/data", file="tendulkar2.csv",
type="batting",homeOrAway=c(2),result=c(1,2))
# Get bowling data and store in file for future
kumble <- getPlayerData(30176,dir="../cricketr/data",file="kumble1.csv",
type="bowling",homeOrAway=c(1),result=c(1,2))
#Get the Tendulkar's Performance against Australia in Australia
tendulkar <-getPlayerData(35320, opposition = 2,host=2,dir=".",
file="tendulkarVsAusInAus.csv",type="batting")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab