install.packages("yorkr") library(yorkr) library(rpart) library(dplyr) load(url("https://github.com/tvganesh/yorkrData/raw/master/ODI/ODI-matches/Australia-India-2012-02-12.RData")) aus_ind <- overs # Display the batting scorecard of Australia teamBattingScorecardMatch(aus_ind,'Australia') # Display the batting scorecard of India teamBattingScorecardMatch(aus_ind,'India') # Plot the batting partenerships of India teamBatsmenPartnershipMatch(aus_ind,"India","Australia") # Plot the performance of Australian batsmen against Indian bowlers teamBatsmenVsBowlersMatch(aus_ind,'Australia',"India", plot=TRUE) # Display the bowling scorecard of India teamBowlingScorecardMatch(aus_ind,'India') # Display the Wicket kind vs Runs conceded of Australia teamBowlingWicketKindMatch(aus_ind,"Australia","India") # Plot the runs conceded of India bowlers vs Australia teamBowlersVsBatsmenMatch(aus_ind,"India","Australia") # Plot the worm chart of the match matchWormGraph(aus_ind,'Australia',"India") # Load the RCB Batting details data from yorkrData load(url("https://github.com/tvganesh/yorkrData/raw/master/battingBowlingDetails/Royal%20Challengers%20Bangalore-BattingDetails.RData")) save(battingDetails,file="Royal Challengers Bangalore-BattingDetails.RData") # Get the current directory d= getwd() # Call getBastmanDetails() and set the path where the .RData file is available kohli <- getBatsmanDetails(team="Royal Challengers Bangalore",name="V Kohli",dir=d) dim(kohli) # Plot the runs scored vs deliveries faced by Virat Kohli at IPL batsmanRunsVsDeliveries(kohli,"V Kohli") # Plot the runs scored by Virat Kohli as 4s, 6s in IPL matches kohli46 <- select(kohli,batsman,ballsPlayed,fours,sixes,runs) batsmanFoursSixes(kohli46,"V Kohli") # Plot the different dismissal types of Virat Kohli in IPL matches batsmanDismissals(kohli,"V Kohli") # Plot the strike rate of Virat Kohli at IPL batsmanRunsVsStrikeRate(kohli,"V Kohli") # Plot the the moving average of Virat Kohli batsmanMovingAverage(kohli,"V Kohli") # Plot the running cumulative average of runs scored by Kohli in IPL batsmanCumulativeAverageRuns(kohli,"V Kohli") # Plot the running cumulative strike rate of Kohli in IPL batsmanCumulativeStrikeRate(kohli,"V Kohli") # Plot the running scored against different oppositions by Kohli in IPL batsmanRunsAgainstOpposition(kohli,"V Kohli") # Plot the runs scored at different venues by Kohli batsmanRunsVenue(kohli,"V Kohli") # Predict the runs scored vs the deliveries faced batsmanRunsPredict(kohli,"V Kohli")