<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/analysis-of-ipl-t20-matches-with-yorkr-templates/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://gigadom.wordpress.com/2017/03/04/analysis-of-ipl-t20-matches-with-yorkr-templates/"> R – Giga thoughts …</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h2>Introduction</h2>
<p>In this post I create RMarkdown templates for end-to-end analysis of IPL T20 matches, that are available on <a target="_blank" rel="nofollow" href="http://cricsheet.org/">Cricsheet</a> based on my R package <a target="_blank" rel="nofollow" href="https://cran.r-project.org/web/packages/yorkr/index.html">yorkr</a>.  With these templates you can convert all IPL data which is in yaml format to R dataframes. Further I create data and the necessary templates for analyzing IPL matches, teams and players. All of these can be accessed at <a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate">yorkrIPLTemplate</a>. The templates are</p>
<ol>
<li>Template for conversion and setup – IPLT20Template.Rmd</li>
<li>Any IPL match – IPLMatchtemplate.Rmd</li>
<li>IPL matches between 2 nations – IPLMatches2TeamTemplate.Rmd</li>
<li>A IPL nations performance against all other IPL nations – IPLAllMatchesAllOppnTemplate.Rmd</li>
<li>Analysis of IPL batsmen and bowlers of all IPL nations – IPLBatsmanBowlerTemplate.Rmd</li>
</ol>
<p>Besides the templates the repository also includes the converted data for all IPL matches I downloaded from Cricsheet in Dec 2016. So this data is complete till the 2016 IPL season. You can recreate the files as more matches are added to Cricsheet site in IPL 2017 and future seasons. This post contains all the steps needed for detailed analysis of IPL matches, teams and IPL player. This will also be my reference in future if I decide to analyze IPL in future!</p>
<p>There will be 5 folders at the root</p>
<ol>
<li>IPLdata – Match files as yaml from Cricsheet</li>
<li>IPLMatches – Yaml match files converted to dataframes</li>
<li>IPLMatchesBetween2Teams – All Matches between any 2 IPL teams</li>
<li>allMatchesAllOpposition – An IPL teams’s performance against all other teams</li>
<li>BattingBowlingDetails – Batting and bowling details of all IPL teams</li>
</ol>
<div>
<pre>library(<span>yorkr</span>)
library(<span>dplyr</span>)</pre>
</div>
<p>The first few steps take care of the data setup. This needs to be done before any of the analysis of IPL batsmen, bowlers, any IPL match, matches between any 2 IPL countries or analysis of a teams performance against all other countries</p>
<p>There will be 5 folders at the root</p>
<ol>
<li>data</li>
<li>IPLMatches</li>
<li>IPLMatchesBetween2Teams</li>
<li>allMatchesAllOpposition</li>
<li>BattingBowlingDetails</li>
</ol>
<h1><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#the-source-yaml-files-will-be-in-ipldata-folder"></a>The source YAML files will be in IPLData folder</h1>
<h1><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#1create-directory-of-iplmatches"></a>1.Create directory of IPLMatches</h1>
<p>Some files may give conversions errors. You could try to debug the problem or just remove it from the IPLdata folder. At most 2-4 file will have conversion problems and I usally remove then from the files to be converted.</p>
<p>Also take a look at my <a target="_blank" rel="nofollow" href="https://tvganesh.shinyapps.io/googlyPlus/">GooglyPlus</a> shiny app which was created after performing the same conversion on the Dec 16 data .</p>
<div>
<pre>convertAllYaml2RDataframesT20(<span><span>&quot;</span>data<span>&quot;</span></span>,<span><span>&quot;</span>IPLMatches<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#2save-all-matches-between-all-combinations-of-ipl-nations"></a>2.Save all matches between all combinations of IPL nations</h3>
<p>This function will create the set of all matches between each IPL team against every other IPL team. This uses the data that was created in IPLMatches, with the convertAllYaml2RDataframesIPL() function.</p>
<div>
<pre>setwd(<span><span>&quot;</span>./IPLMatchesBetween2Teams<span>&quot;</span></span>)
saveAllMatchesBetween2IPLTeams(<span><span>&quot;</span>../IPLMatches<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#3save-all-matches-against-all-opposition"></a>3.Save all matches against all opposition</h3>
<p>This will create a consolidated dataframe of all matches played by every IPL playing nation against all other nattions. This also uses the data that was created in IPLMatches, with the convertAllYaml2RDataframesIPL() function.</p>
<div>
<pre>setwd(<span><span>&quot;</span>../allMatchesAllOpposition<span>&quot;</span></span>)
saveAllMatchesAllOppositionIPLT20(<span><span>&quot;</span>../IPLMatches<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#4-create-batting-and-bowling-details-for-each-ipl-team"></a>4. Create batting and bowling details for each IPL team</h3>
<p>These are the current IPL playing teams. You can add to this vector as newer IPL teams start playing IPL. You will get to know all IPL teams by also look at the directory created above namely allMatchesAllOpposition. This also uses the data that was created in IPLMatches, with the convertAllYaml2RDataframesIPL() function.</p>
<div>
<pre>setwd(<span><span>&quot;</span>../BattingBowlingDetails<span>&quot;</span></span>)
<span>ipl_teams</span> <span>&lt;-</span> <span>list</span>(<span><span>&quot;</span>Chennai Super Kings<span>&quot;</span></span>,<span><span>&quot;</span>Deccan Chargers<span>&quot;</span></span>, <span><span>&quot;</span>Delhi Daredevils<span>&quot;</span></span>,<span><span>&quot;</span>Kings XI Punjab<span>&quot;</span></span>, 
              <span><span>&quot;</span>Kochi Tuskers Kerala<span>&quot;</span></span>,<span><span>&quot;</span>Kolkata Knight Riders<span>&quot;</span></span>,<span><span>&quot;</span>Mumbai Indians<span>&quot;</span></span>,<span><span>&quot;</span>Pune Warriors<span>&quot;</span></span>,
              <span><span>&quot;</span>Rajasthan Royals<span>&quot;</span></span>,<span><span>&quot;</span>Royal Challengers Bangalore<span>&quot;</span></span>,<span><span>&quot;</span>Sunrisers Hyderabad<span>&quot;</span></span>,<span><span>&quot;</span>Gujarat Lions<span>&quot;</span></span>,
                 <span><span>&quot;</span>Rising Pune Supergiants<span>&quot;</span></span>)

<span>for</span>(<span>i</span> <span>in</span> seq_along(<span>ipl_teams</span>)){
    print(<span>ipl_teams</span>[<span>i</span>])
    <span>val</span> <span>&lt;-</span> paste(<span>ipl_teams</span>[<span>i</span>],<span><span>&quot;</span>-details<span>&quot;</span></span>,<span>sep</span><span>=</span><span><span>&quot;</span><span>&quot;</span></span>)
    <span>val</span> <span>&lt;-</span> getTeamBattingDetails(<span>ipl_teams</span>[<span>i</span>],<span>dir</span><span>=</span><span><span>&quot;</span>../IPLMatches<span>&quot;</span></span>, <span>save</span><span>=</span><span>TRUE</span>)

}

<span>for</span>(<span>i</span> <span>in</span> seq_along(<span>ipl_teams</span>)){
    print(<span>ipl_teams</span>[<span>i</span>])
    <span>val</span> <span>&lt;-</span> paste(<span>ipl_teams</span>[<span>i</span>],<span><span>&quot;</span>-details<span>&quot;</span></span>,<span>sep</span><span>=</span><span><span>&quot;</span><span>&quot;</span></span>)
    <span>val</span> <span>&lt;-</span> getTeamBowlingDetails(<span>ipl_teams</span>[<span>i</span>],<span>dir</span><span>=</span><span><span>&quot;</span>../IPLMatches<span>&quot;</span></span>, <span>save</span><span>=</span><span>TRUE</span>)

}</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#5-get-the-list-of-batsmen-for-a-particular-ipl-team"></a>5. Get the list of batsmen for a particular IPL team</h3>
<p>The following code is needed for analyzing individual IPL batsmen. In IPL a player could have played in multiple IPL teams.</p>
<div>
<pre><span>getBatsmen</span> <span>&lt;-</span> <span>function</span>(<span>df</span>){
    <span>bmen</span> <span>&lt;-</span> <span>df</span> %<span>></span>% distinct(<span>batsman</span>) 
    <span>bmen</span> <span>&lt;-</span> as.character(<span>bmen</span><span>$</span><span>batsman</span>)
    <span>batsmen</span> <span>&lt;-</span> sort(<span>bmen</span>)
}
load(<span><span>&quot;</span>Chennai Super Kings-BattingDetails.RData<span>&quot;</span></span>)
<span>csk_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Deccan Chargers-BattingDetails.RData<span>&quot;</span></span>)
<span>dc_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Delhi Daredevils-BattingDetails.RData<span>&quot;</span></span>)
<span>dd_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Kings XI Punjab-BattingDetails.RData<span>&quot;</span></span>)
<span>kxip_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Kochi Tuskers Kerala-BattingDetails.RData<span>&quot;</span></span>)
<span>ktk_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Kolkata Knight Riders-BattingDetails.RData<span>&quot;</span></span>)
<span>kkr_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Mumbai Indians-BattingDetails.RData<span>&quot;</span></span>)
<span>mi_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Pune Warriors-BattingDetails.RData<span>&quot;</span></span>)
<span>pw_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Rajasthan Royals-BattingDetails.RData<span>&quot;</span></span>)
<span>rr_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Royal Challengers Bangalore-BattingDetails.RData<span>&quot;</span></span>)
<span>rcb_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Sunrisers Hyderabad-BattingDetails.RData<span>&quot;</span></span>)
<span>sh_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Gujarat Lions-BattingDetails.RData<span>&quot;</span></span>)
<span>gl_details</span> <span>&lt;-</span> <span>battingDetails</span>
load(<span><span>&quot;</span>Rising Pune Supergiants-BattingDetails.RData<span>&quot;</span></span>)
<span>rps_details</span> <span>&lt;-</span> <span>battingDetails</span>

<span>#Get the batsmen for each IPL team</span>
<span>csk_batsmen</span> <span>&lt;-</span> getBatsmen(<span>csk_details</span>)
<span>dc_batsmen</span> <span>&lt;-</span> getBatsmen(<span>dc_details</span>)
<span>dd_batsmen</span> <span>&lt;-</span> getBatsmen(<span>dd_details</span>)
<span>kxip_batsmen</span> <span>&lt;-</span> getBatsmen(<span>kxip_details</span>)
<span>ktk_batsmen</span> <span>&lt;-</span> getBatsmen(<span>ktk_details</span>)
<span>kkr_batsmen</span> <span>&lt;-</span> getBatsmen(<span>kkr_details</span>)
<span>mi_batsmen</span> <span>&lt;-</span> getBatsmen(<span>mi_details</span>)
<span>pw_batsmen</span> <span>&lt;-</span> getBatsmen(<span>pw_details</span>)
<span>rr_batsmen</span> <span>&lt;-</span> getBatsmen(<span>rr_details</span>)
<span>rcb_batsmen</span> <span>&lt;-</span> getBatsmen(<span>rcb_details</span>)
<span>sh_batsmen</span> <span>&lt;-</span> getBatsmen(<span>sh_details</span>)
<span>gl_batsmen</span> <span>&lt;-</span> getBatsmen(<span>gl_details</span>)
<span>rps_batsmen</span> <span>&lt;-</span> getBatsmen(<span>rps_details</span>)

<span># Save the dataframes</span>
save(<span>csk_batsmen</span>,<span>file</span><span>=</span><span><span>&quot;</span>csk.RData<span>&quot;</span></span>)
save(<span>dc_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>dc.RData<span>&quot;</span></span>)
save(<span>dd_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>dd.RData<span>&quot;</span></span>)
save(<span>kxip_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>kxip.RData<span>&quot;</span></span>)
save(<span>ktk_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>ktk.RData<span>&quot;</span></span>)
save(<span>kkr_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>kkr.RData<span>&quot;</span></span>)
save(<span>mi_batsmen</span> , <span>file</span><span>=</span><span><span>&quot;</span>mi.RData<span>&quot;</span></span>)
save(<span>pw_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>pw.RData<span>&quot;</span></span>)
save(<span>rr_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>rr.RData<span>&quot;</span></span>)
save(<span>rcb_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>rcb.RData<span>&quot;</span></span>)
save(<span>sh_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>sh.RData<span>&quot;</span></span>)
save(<span>gl_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>gl.RData<span>&quot;</span></span>)
save(<span>rps_batsmen</span>, <span>file</span><span>=</span><span><span>&quot;</span>rps.RData<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#6-get-the-list-of-bowlers-for-a-particular-ipl-team"></a>6. Get the list of bowlers for a particular IPL team</h3>
<p>The method below can get the list of bowler names for any IPL team.The following code is needed for analyzing individual IPL bowlers. In IPL a player could have played in multiple IPL teams.</p>
<div>
<pre><span>getBowlers</span> <span>&lt;-</span> <span>function</span>(<span>df</span>){
    <span>bwlr</span> <span>&lt;-</span> <span>df</span> %<span>></span>% distinct(<span>bowler</span>) 
    <span>bwlr</span> <span>&lt;-</span> as.character(<span>bwlr</span><span>$</span><span>bowler</span>)
    <span>bowler</span> <span>&lt;-</span> sort(<span>bwlr</span>)
}

load(<span><span>&quot;</span>Chennai Super Kings-BowlingDetails.RData<span>&quot;</span></span>)
<span>csk_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Deccan Chargers-BowlingDetails.RData<span>&quot;</span></span>)
<span>dc_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Delhi Daredevils-BowlingDetails.RData<span>&quot;</span></span>)
<span>dd_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Kings XI Punjab-BowlingDetails.RData<span>&quot;</span></span>)
<span>kxip_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Kochi Tuskers Kerala-BowlingDetails.RData<span>&quot;</span></span>)
<span>ktk_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Kolkata Knight Riders-BowlingDetails.RData<span>&quot;</span></span>)
<span>kkr_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Mumbai Indians-BowlingDetails.RData<span>&quot;</span></span>)
<span>mi_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Pune Warriors-BowlingDetails.RData<span>&quot;</span></span>)
<span>pw_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Rajasthan Royals-BowlingDetails.RData<span>&quot;</span></span>)
<span>rr_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Royal Challengers Bangalore-BowlingDetails.RData<span>&quot;</span></span>)
<span>rcb_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Sunrisers Hyderabad-BowlingDetails.RData<span>&quot;</span></span>)
<span>sh_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Gujarat Lions-BowlingDetails.RData<span>&quot;</span></span>)
<span>gl_details</span> <span>&lt;-</span> <span>bowlingDetails</span>
load(<span><span>&quot;</span>Rising Pune Supergiants-BowlingDetails.RData<span>&quot;</span></span>)
<span>rps_details</span> <span>&lt;-</span> <span>bowlingDetails</span>

<span># Get the bowlers for each team</span>
<span>csk_bowlers</span> <span>&lt;-</span> getBowlers(<span>csk_details</span>)
<span>dc_bowlers</span> <span>&lt;-</span> getBowlers(<span>dc_details</span>)
<span>dd_bowlers</span> <span>&lt;-</span> getBowlers(<span>dd_details</span>)
<span>kxip_bowlers</span> <span>&lt;-</span> getBowlers(<span>kxip_details</span>)
<span>ktk_bowlers</span> <span>&lt;-</span> getBowlers(<span>ktk_details</span>)
<span>kkr_bowlers</span> <span>&lt;-</span> getBowlers(<span>kkr_details</span>)
<span>mi_bowlers</span> <span>&lt;-</span> getBowlers(<span>mi_details</span>)
<span>pw_bowlers</span> <span>&lt;-</span> getBowlers(<span>pw_details</span>)
<span>rr_bowlers</span> <span>&lt;-</span> getBowlers(<span>rr_details</span>)
<span>rcb_bowlers</span> <span>&lt;-</span> getBowlers(<span>rcb_details</span>)
<span>sh_bowlers</span> <span>&lt;-</span> getBowlers(<span>sh_details</span>)
<span>gl_bowlers</span> <span>&lt;-</span> getBowlers(<span>gl_details</span>)
<span>rps_bowlers</span> <span>&lt;-</span> getBowlers(<span>rps_details</span>)

<span>#Save the dataframes</span>
save(<span>csk_bowlers</span>,<span>file</span><span>=</span><span><span>&quot;</span>csk1.RData<span>&quot;</span></span>)
save(<span>dc_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>dc1.RData<span>&quot;</span></span>)
save(<span>dd_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>dd1.RData<span>&quot;</span></span>)
save(<span>kxip_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>kxip1.RData<span>&quot;</span></span>)
save(<span>ktk_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>ktk1.RData<span>&quot;</span></span>)
save(<span>kkr_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>kkr1.RData<span>&quot;</span></span>)
save(<span>mi_bowlers</span> , <span>file</span><span>=</span><span><span>&quot;</span>mi1.RData<span>&quot;</span></span>)
save(<span>pw_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>pw1.RData<span>&quot;</span></span>)
save(<span>rr_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>rr1.RData<span>&quot;</span></span>)
save(<span>rcb_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>rcb1.RData<span>&quot;</span></span>)
save(<span>sh_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>sh1.RData<span>&quot;</span></span>)
save(<span>gl_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>gl1.RData<span>&quot;</span></span>)
save(<span>rps_bowlers</span>, <span>file</span><span>=</span><span><span>&quot;</span>rps1.RData<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLT20Template.Rmd#now-we-are-all-set"></a>Now we are all set</h3>
<h3>A)  IPL T20 Match Analysis</h3>
<h3>1 IPL Match Analysis</h3>
<p>Load any match data from the ./IPLMatches folder for e.g. Chennai Super Kings-Deccan Chargers-2008-05-06.RData</p>
<div>
<pre>setwd(<span><span>&quot;</span>./IPLMatches<span>&quot;</span></span>)
load(<span><span>&quot;</span>Chennai Super Kings-Deccan Chargers-2008-05-06.RData<span>&quot;</span></span>)
<span>csk_dc</span><span>&lt;-</span> <span>overs</span>
<span>#The steps are</span>
load(<span><span>&quot;</span>IPLTeam1-IPLTeam2-Date.Rdata<span>&quot;</span></span>)
<span>IPLTeam1_IPLTeam2</span> <span>&lt;-</span> <span>overs</span></pre>
</div>
<p>All analysis for this match can be done now</p>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#2-scorecard"></a>2. Scorecard</h3>
<div>
<pre>teamBattingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
teamBattingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#3batting-partnerships"></a>3.Batting Partnerships</h3>
<div>
<pre>teamBatsmenPartnershipMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
teamBatsmenPartnershipMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#4-batsmen-vs-bowler-plot"></a>4. Batsmen vs Bowler Plot</h3>
<div>
<pre>teamBatsmenVsBowlersMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>TRUE</span>)
teamBatsmenVsBowlersMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#5-team-bowling-scorecard"></a>5. Team bowling scorecard</h3>
<div>
<pre>teamBowlingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
teamBowlingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#6-team-bowling-wicket-kind-match"></a>6. Team bowling Wicket kind match</h3>
<div>
<pre>teamBowlingWicketKindMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
<span>m</span> <span>&lt;-</span>teamBowlingWicketKindMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#7-team-bowling-wicket-runs-match"></a>7. Team Bowling Wicket Runs Match</h3>
<div>
<pre>teamBowlingWicketRunsMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
<span>m</span> <span>&lt;-</span>teamBowlingWicketRunsMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#8-team-bowling-wicket-match"></a>8. Team Bowling Wicket Match</h3>
<div>
<pre><span>m</span> <span>&lt;-</span>teamBowlingWicketMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span>
teamBowlingWicketMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#9-team-bowler-vs-batsmen"></a>9. Team Bowler vs Batsmen</h3>
<div>
<pre>teamBowlersVsBatsmenMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
<span>m</span> <span>&lt;-</span> teamBowlersVsBatsmenMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#10-match-worm-chart"></a>10. Match Worm chart</h3>
<div>
<pre>matchWormGraph(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3>B)  IPL  Matches between 2  IPL teams</h3>
<h3>1 IPL Match Analysis</h3>
<p>Load any match data from the ./IPLMatches folder for e.g. Chennai Super Kings-Deccan Chargers-2008-05-06.RData</p>
<div>
<pre>setwd(<span><span>&quot;</span>./IPLMatches<span>&quot;</span></span>)
load(<span><span>&quot;</span>Chennai Super Kings-Deccan Chargers-2008-05-06.RData<span>&quot;</span></span>)
<span>csk_dc</span><span>&lt;-</span> <span>overs</span>
<span>#The steps are</span>
load(<span><span>&quot;</span>IPLTeam1-IPLTeam2-Date.Rdata<span>&quot;</span></span>)
<span>IPLTeam1_IPLTeam2</span> <span>&lt;-</span> <span>overs</span></pre>
</div>
<p>All analysis for this match can be done now</p>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#2-scorecard"></a>2. Scorecard</h3>
<div>
<pre>teamBattingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
teamBattingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#3batting-partnerships"></a>3.Batting Partnerships</h3>
<div>
<pre>teamBatsmenPartnershipMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
teamBatsmenPartnershipMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#4-batsmen-vs-bowler-plot"></a>4. Batsmen vs Bowler Plot</h3>
<div>
<pre>teamBatsmenVsBowlersMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>TRUE</span>)
teamBatsmenVsBowlersMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#5-team-bowling-scorecard"></a>5. Team bowling scorecard</h3>
<div>
<pre>teamBowlingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
teamBowlingScorecardMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#6-team-bowling-wicket-kind-match"></a>6. Team bowling Wicket kind match</h3>
<div>
<pre>teamBowlingWicketKindMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
<span>m</span> <span>&lt;-</span>teamBowlingWicketKindMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#7-team-bowling-wicket-runs-match"></a>7. Team Bowling Wicket Runs Match</h3>
<div>
<pre>teamBowlingWicketRunsMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
<span>m</span> <span>&lt;-</span>teamBowlingWicketRunsMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#8-team-bowling-wicket-match"></a>8. Team Bowling Wicket Match</h3>
<div>
<pre><span>m</span> <span>&lt;-</span>teamBowlingWicketMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span>
teamBowlingWicketMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#9-team-bowler-vs-batsmen"></a>9. Team Bowler vs Batsmen</h3>
<div>
<pre>teamBowlersVsBatsmenMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
<span>m</span> <span>&lt;-</span> teamBowlersVsBatsmenMatch(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>FALSE</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLMatchtemplate.Rmd#10-match-worm-chart"></a>10. Match Worm chart</h3>
<div>
<pre>matchWormGraph(<span>IPLTeam1_IPLTeam2</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3>C)  IPL Matches for a team against all other teams</h3>
<h3>1. IPL Matches for a team against all other teams</h3>
<p>Load the data between for a IPL team against all other countries ./allMatchesAllOpposition for e.g all matches of Kolkata Knight Riders</p>
<div>
<pre>load(<span><span>&quot;</span>allMatchesAllOpposition-Kolkata Knight Riders.RData<span>&quot;</span></span>)
<span>kkr_matches</span> <span>&lt;-</span> <span>matches</span>
<span>IPLTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>
<span>allMatches</span> <span>&lt;-</span> paste(<span><span>&quot;</span>allMatchesAllOposition-<span>&quot;</span></span>,<span>IPLTeam</span>,<span><span>&quot;</span>.RData<span>&quot;</span></span>,<span>sep</span><span>=</span><span><span>&quot;</span><span>&quot;</span></span>)
load(<span>allMatches</span>)
<span>IPLTeam1AllMatches</span> <span>&lt;-</span> <span>matches</span>
</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#2-teams-batting-scorecard-all-matches"></a>2. Team’s batting scorecard all Matches</h3>
<div>
<pre><span>m</span> <span>&lt;-</span>teamBattingScorecardAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#3-batting-scorecard-of-opposing-team"></a>3. Batting scorecard of opposing team</h3>
<div>
<pre><span>m</span> <span>&lt;-</span>teamBattingScorecardAllOppnAllMatches(<span>matches</span><span>=</span><span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#4-team-batting-partnerships"></a>4. Team batting partnerships</h3>
<div>
<pre><span>m</span> <span>&lt;-</span> teamBatsmenPartnershipAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
<span>m</span>
<span>m</span> <span>&lt;-</span> teamBatsmenPartnershipAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>'</span>IPLTeam1<span>'</span></span>,<span>report</span><span>=</span><span><span>&quot;</span>detailed<span>&quot;</span></span>)
head(<span>m</span>,<span>30</span>)
<span>m</span> <span>&lt;-</span> teamBatsmenPartnershipAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>'</span>IPLTeam1<span>'</span></span>,<span>report</span><span>=</span><span><span>&quot;</span>summary<span>&quot;</span></span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#5-team-batting-partnerships-plot"></a>5. Team batting partnerships plot</h3>
<div>
<pre>teamBatsmenPartnershipAllOppnAllMatchesPlot(<span>IPLTeam1AllMatches</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>main</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
teamBatsmenPartnershipAllOppnAllMatchesPlot(<span>IPLTeam1AllMatches</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>main</span><span>=</span><span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#6-team-batsmen-vs-bowlers-report"></a>6, Team batsmen vs bowlers report</h3>
<div>
<pre><span>m</span> <span>&lt;-</span>teamBatsmenVsBowlersAllOppnAllMatchesRept(<span>IPLTeam1AllMatches</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>0</span>)
<span>m</span>
<span>m</span> <span>&lt;-</span>teamBatsmenVsBowlersAllOppnAllMatchesRept(<span>IPLTeam1AllMatches</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>1</span>,<span>dispRows</span><span>=</span><span>30</span>)
<span>m</span>
<span>m</span> <span>&lt;-</span>teamBatsmenVsBowlersAllOppnAllMatchesRept(<span>matches</span><span>=</span><span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>rank</span><span>=</span><span>1</span>,<span>dispRows</span><span>=</span><span>25</span>)
<span>m</span></pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#7-team-batsmen-vs-bowler-plot"></a>7. Team batsmen vs bowler plot</h3>
<div>
<pre><span>d</span> <span>&lt;-</span> teamBatsmenVsBowlersAllOppnAllMatchesRept(<span>IPLTeam1AllMatches</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>1</span>,<span>dispRows</span><span>=</span><span>50</span>)
<span>d</span>
teamBatsmenVsBowlersAllOppnAllMatchesPlot(<span>d</span>)
<span>d</span> <span>&lt;-</span> teamBatsmenVsBowlersAllOppnAllMatchesRept(<span>IPLTeam1AllMatches</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>2</span>,<span>dispRows</span><span>=</span><span>50</span>)
teamBatsmenVsBowlersAllOppnAllMatchesPlot(<span>d</span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#8-team-bowling-scorecard"></a>8. Team bowling scorecard</h3>
<div>
<pre>teamBowlingScorecardAllOppnAllMatchesMain(<span>matches</span><span>=</span><span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)
teamBowlingScorecardAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span><span>'</span>IPLTeam2<span>'</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#9-team-bowler-vs-batsmen"></a>9. Team bowler vs batsmen</h3>
<div>
<pre>teamBowlersVsBatsmenAllOppnAllMatchesMain(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>0</span>)
teamBowlersVsBatsmenAllOppnAllMatchesMain(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>2</span>)
teamBowlersVsBatsmenAllOppnAllMatchesRept(<span>matches</span><span>=</span><span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>0</span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#10-team-bowler-vs-bastmen"></a>10. Team Bowler vs bastmen</h3>
<div>
<pre><span>df</span> <span>&lt;-</span> teamBowlersVsBatsmenAllOppnAllMatchesRept(<span>IPLTeam1AllMatches</span>,<span>theTeam</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>rank</span><span>=</span><span>1</span>)
teamBowlersVsBatsmenAllOppnAllMatchesPlot(<span>df</span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#11-team-bowler-wicket-kind"></a>11. Team bowler wicket kind</h3>
<div>
<pre>teamBowlingWicketKindAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>t1</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>t2</span><span>=</span><span><span>&quot;</span>All<span>&quot;</span></span>)
teamBowlingWicketKindAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>t1</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>t2</span><span>=</span><span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>)
</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLAllMatchesAllOppnTemplate.Rmd#12"></a>12.</h3>
<div>
<pre>teamBowlingWicketRunsAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>t1</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>t2</span><span>=</span><span><span>&quot;</span>All<span>&quot;</span></span>,<span>plot</span><span>=</span><span>TRUE</span>)
teamBowlingWicketRunsAllOppnAllMatches(<span>IPLTeam1AllMatches</span>,<span>t1</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>t2</span><span>=</span><span><span>&quot;</span>IPLTeam2<span>&quot;</span></span>,<span>plot</span><span>=</span><span>TRUE</span>)</pre>
</div>
<h3>1 IPL Batsman setup functions</h3>
<p>Get the batsman’s details for a batsman</p>
<div>
<pre>setwd(<span><span>&quot;</span>../BattingBowlingDetails<span>&quot;</span></span>)
<span># IPL Team names</span>
<span>IPLTeamNames</span> <span>&lt;-</span> <span>list</span>(<span><span>&quot;</span>Chennai Super Kings<span>&quot;</span></span>,<span><span>&quot;</span>Deccan Chargers<span>&quot;</span></span>, <span><span>&quot;</span>Delhi Daredevils<span>&quot;</span></span>,<span><span>&quot;</span>Kings Xi Punjab<span>&quot;</span></span>, 
                  <span><span>&quot;</span>Kochi Tuskers Kerala<span>&quot;</span></span>,<span><span>&quot;</span>Kolkata Knight Riders<span>&quot;</span></span>,<span><span>&quot;</span>Mumbai Indians<span>&quot;</span></span>,<span><span>&quot;</span>Pune Warriors<span>&quot;</span></span>,
                  <span><span>&quot;</span>Rajasthan Royals<span>&quot;</span></span>,<span><span>&quot;</span>Royal Challengers Bangalore<span>&quot;</span></span>,<span><span>&quot;</span>Sunrisers Hyderabad<span>&quot;</span></span>,<span><span>&quot;</span>Gujarat Lions<span>&quot;</span></span>,
                  <span><span>&quot;</span>Rising Pune Supergiants<span>&quot;</span></span>)           


<span># Check and get the team indices of IPL teams in which the batsman has played</span>
<span>getTeamIndex</span> <span>&lt;-</span> <span>function</span>(<span>batsman</span>){
    setwd(<span><span>&quot;</span>./BattingBowlingDetails<span>&quot;</span></span>)
    load(<span><span>&quot;</span>csk.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>dc.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>dd.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>kxip.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>ktk.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>kkr.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>mi.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>pw.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>rr.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>rcb.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>sh.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>gl.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>rps.RData<span>&quot;</span></span>)
    setwd(<span><span>&quot;</span>..<span>&quot;</span></span>)
    getwd()
    print(ls())
    <span>teams_batsmen</span> <span>=</span> <span>list</span>(<span>csk_batsmen</span>,<span>dc_batsmen</span>,<span>dd_batsmen</span>,<span>kxip_batsmen</span>,<span>ktk_batsmen</span>,<span>kkr_batsmen</span>,<span>mi_batsmen</span>,
                         <span>pw_batsmen</span>,<span>rr_batsmen</span>,<span>rcb_batsmen</span>,<span>sh_batsmen</span>,<span>gl_batsmen</span>,<span>rps_batsmen</span>)
    <span>b</span> <span>&lt;-</span> <span>NULL</span>
    <span>for</span> (<span>i</span> <span>in</span> <span>1</span><span>:</span>length(<span>teams_batsmen</span>)){
        <span>a</span> <span>&lt;-</span> which(<span>teams_batsmen</span>[[<span>i</span>]] <span>==</span> <span>batsman</span>)

        <span>if</span>(length(<span>a</span>) <span>!=</span> <span>0</span>)
            <span>b</span> <span>&lt;-</span> c(<span>b</span>,<span>i</span>)
    }
    <span>b</span>
}

<span># Get the list of the IPL team names from the indices passed</span>
<span>getTeams</span> <span>&lt;-</span> <span>function</span>(<span>x</span>){

    <span>l</span> <span>&lt;-</span> <span>NULL</span>
    <span># Get the teams passed in as indexes</span>
    <span>for</span> (<span>i</span> <span>in</span> seq_along(<span>x</span>)){

        <span>l</span> <span>&lt;-</span> c(<span>l</span>, <span>IPLTeamNames</span>[[<span>x</span>[<span>i</span>]]]) 

    }
    <span>l</span>
}

<span># Create a consolidated data frame with all teams the IPL batsman has played for</span>
<span>getIPLBatsmanDF</span> <span>&lt;-</span> <span>function</span>(<span>teamNames</span>){
    <span>batsmanDF</span> <span>&lt;-</span> <span>NULL</span>
   <span># Create a consolidated Data frame of batsman for all IPL teams played</span>
    <span>for</span> (<span>i</span> <span>in</span> seq_along(<span>teamNames</span>)){
       <span>df</span> <span>&lt;-</span> getBatsmanDetails(<span>team</span><span>=</span><span>teamNames</span>[<span>i</span>],<span>name</span><span>=</span><span>IPLBatsman</span>,<span>dir</span><span>=</span><span><span>&quot;</span>./BattingBowlingDetails<span>&quot;</span></span>)
       <span>batsmanDF</span> <span>&lt;-</span> rbind(<span>batsmanDF</span>,<span>df</span>) 

    }
    <span>batsmanDF</span>
}
</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#2-create-a-consolidated-ipl-batsman-data-frame"></a>2. Create a consolidated IPL batsman data frame</h3>
<div>
<pre><span># Since an IPL batsman coculd have played in multiple teams we need to determine these teams and</span>
<span># create a consolidated data frame for the analysis</span>
<span># For example to check MS Dhoni we need to do the following</span>

<span>IPLBatsman</span> <span>=</span> <span><span>&quot;</span>MS Dhoni<span>&quot;</span></span>
<span>#Check and get the team indices of IPL teams in which the batsman has played</span>
<span>i</span> <span>&lt;-</span> getTeamIndex(<span>IPLBatsman</span>)

<span># Get the team names in which the IPL batsman has played</span>
<span>teamNames</span> <span>&lt;-</span> getTeams(<span>i</span>)
    <span># Check if file exists in the directory. This check is necessary when moving between matchType</span>


<span>############## Create a consolidated IPL batsman dataframe for analysis</span>
<span>batsmanDF</span> <span>&lt;-</span> getIPLBatsmanDF(<span>teamNames</span>)
</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#3-runs-vs-deliveries"></a>3. Runs vs deliveries</h3>
<div>
<pre><span># For e.g. batsmanName=&quot;MS Dhoni&quot;&quot;</span>
<span>#batsmanRunsVsDeliveries(batsmanDF, &quot;MS Dhoni&quot;)</span>
batsmanRunsVsDeliveries(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#4-batsman-4s--6s"></a>4. Batsman 4s &amp; 6s</h3>
<div>
<pre><span>batsman46</span> <span>&lt;-</span> select(<span>batsmanDF</span>,<span>batsman</span>,<span>ballsPlayed</span>,<span>fours</span>,<span>sixes</span>,<span>runs</span>)
<span>p1</span> <span>&lt;-</span> batsmanFoursSixes(<span>batsman46</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#5-batsman-dismissals"></a>5. Batsman dismissals</h3>
<div>
<pre>batsmanDismissals(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#6-runs-vs-strike-rate"></a>6. Runs vs Strike rate</h3>
<div>
<pre>batsmanRunsVsStrikeRate(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#7-batsman-moving-average"></a>7. Batsman Moving Average</h3>
<div>
<pre>batsmanMovingAverage(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#8-batsman-cumulative-average"></a>8. Batsman cumulative average</h3>
<div>
<pre>batsmanCumulativeAverageRuns(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#9-batsman-cumulative-strike-rate"></a>9. Batsman cumulative strike rate</h3>
<div>
<pre>batsmanCumulativeStrikeRate(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#10-batsman-runs-against-oppositions"></a>10. Batsman runs against oppositions</h3>
<div>
<pre>batsmanRunsAgainstOpposition(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#11-batsman-runs-vs-venue"></a>11. Batsman runs vs venue</h3>
<div>
<pre>batsmanRunsVenue(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#12-batsman-runs-predict"></a>12. Batsman runs predict</h3>
<div>
<pre>batsmanRunsPredict(<span>batsmanDF</span>,<span><span>&quot;</span>batsmanName<span>&quot;</span></span>)</pre>
</div>
<h3>13.Bowler set up functions</h3>
<div>
<pre>setwd(<span><span>&quot;</span>../BattingBowlingDetails<span>&quot;</span></span>)
<span># IPL Team names</span>
<span>IPLTeamNames</span> <span>&lt;-</span> <span>list</span>(<span><span>&quot;</span>Chennai Super Kings<span>&quot;</span></span>,<span><span>&quot;</span>Deccan Chargers<span>&quot;</span></span>, <span><span>&quot;</span>Delhi Daredevils<span>&quot;</span></span>,<span><span>&quot;</span>Kings Xi Punjab<span>&quot;</span></span>, 
                  <span><span>&quot;</span>Kochi Tuskers Kerala<span>&quot;</span></span>,<span><span>&quot;</span>Kolkata Knight Riders<span>&quot;</span></span>,<span><span>&quot;</span>Mumbai Indians<span>&quot;</span></span>,<span><span>&quot;</span>Pune Warriors<span>&quot;</span></span>,
                  <span><span>&quot;</span>Rajasthan Royals<span>&quot;</span></span>,<span><span>&quot;</span>Royal Challengers Bangalore<span>&quot;</span></span>,<span><span>&quot;</span>Sunrisers Hyderabad<span>&quot;</span></span>,<span><span>&quot;</span>Gujarat Lions<span>&quot;</span></span>,
                  <span><span>&quot;</span>Rising Pune Supergiants<span>&quot;</span></span>)    



<span># Get the team indices of IPL teams for which the bowler as played</span>
<span>getTeamIndex_bowler</span> <span>&lt;-</span> <span>function</span>(<span>bowler</span>){
    <span># Load IPL Bowlers</span>
    setwd(<span><span>&quot;</span>./data<span>&quot;</span></span>)
    load(<span><span>&quot;</span>csk1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>dc1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>dd1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>kxip1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>ktk1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>kkr1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>mi1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>pw1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>rr1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>rcb1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>sh1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>gl1.RData<span>&quot;</span></span>)
    load(<span><span>&quot;</span>rps1.RData<span>&quot;</span></span>)
    setwd(<span><span>&quot;</span>..<span>&quot;</span></span>)
    <span>teams_bowlers</span> <span>=</span> <span>list</span>(<span>csk_bowlers</span>,<span>dc_bowlers</span>,<span>dd_bowlers</span>,<span>kxip_bowlers</span>,<span>ktk_bowlers</span>,<span>kkr_bowlers</span>,<span>mi_bowlers</span>,
                         <span>pw_bowlers</span>,<span>rr_bowlers</span>,<span>rcb_bowlers</span>,<span>sh_bowlers</span>,<span>gl_bowlers</span>,<span>rps_bowlers</span>)
    <span>b</span> <span>&lt;-</span> <span>NULL</span>
    <span>for</span> (<span>i</span> <span>in</span> <span>1</span><span>:</span>length(<span>teams_bowlers</span>)){
        <span>a</span> <span>&lt;-</span> which(<span>teams_bowlers</span>[[<span>i</span>]] <span>==</span> <span>bowler</span>)
        <span>if</span>(length(<span>a</span>) <span>!=</span> <span>0</span>){
            <span>b</span> <span>&lt;-</span> c(<span>b</span>,<span>i</span>)
        }
    }
    <span>b</span>
}


<span># Get the list of the IPL team names from the indices passed</span>
<span>getTeams</span> <span>&lt;-</span> <span>function</span>(<span>x</span>){

    <span>l</span> <span>&lt;-</span> <span>NULL</span>
    <span># Get the teams passed in as indexes</span>
    <span>for</span> (<span>i</span> <span>in</span> seq_along(<span>x</span>)){

        <span>l</span> <span>&lt;-</span> c(<span>l</span>, <span>IPLTeamNames</span>[[<span>x</span>[<span>i</span>]]]) 

    }
    <span>l</span>
}

<span># Get the team names</span>
<span>teamNames</span> <span>&lt;-</span> getTeams(<span>i</span>)

<span>getIPLBowlerDF</span> <span>&lt;-</span> <span>function</span>(<span>teamNames</span>){
    <span>bowlerDF</span> <span>&lt;-</span> <span>NULL</span>

    <span># Create a consolidated Data frame of batsman for all IPL teams played</span>
    <span>for</span> (<span>i</span> <span>in</span> seq_along(<span>teamNames</span>)){
          <span>df</span> <span>&lt;-</span> getBowlerWicketDetails(<span>team</span><span>=</span><span>teamNames</span>[<span>i</span>],<span>name</span><span>=</span><span>IPLBowler</span>,<span>dir</span><span>=</span><span><span>&quot;</span>./BattingBowlingDetails<span>&quot;</span></span>)
          <span>bowlerDF</span> <span>&lt;-</span> rbind(<span>bowlerDF</span>,<span>df</span>) 

    }
    <span>bowlerDF</span>
}</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#13-get-the-consolidated-data-frame-for-an-ipl-bowler"></a>14. Get the consolidated data frame for an IPL bowler</h3>
<div>
<pre><span># Since an IPL bowler could have played in multiple teams we need to determine these teams and</span>
<span># create a consolidated data frame for the analysis</span>
<span># For example to check R Ashwin we need to do the following</span>

<span>IPLBowler</span> <span>=</span> <span><span>&quot;</span>R Ashwin<span>&quot;</span></span>
<span>#Check and get the team indices of IPL teams in which the batsman has played</span>
<span>i</span> <span>&lt;-</span> getTeamIndex(<span>IPLBowler</span>)

<span># Get the team names in which the IPL batsman has played</span>
<span>teamNames</span> <span>&lt;-</span> getTeams(<span>i</span>)
    <span># Check if file exists in the directory. This check is necessary when moving between matchType</span>


<span>############## Create a consolidated IPL batsman dataframe for analysis</span>
<span>bowlerDF</span> <span>&lt;-</span> getIPLBowlerDF(<span>teamNames</span>)
</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#14-bowler-mean-economy-rate"></a>15. Bowler Mean Economy rate</h3>
<div>
<pre><span># For e.g. to get the details of R Ashwin do</span>
<span>#bowlerMeanEconomyRate(bowlerDF,&quot;R Ashwin&quot;)</span>
bowlerMeanEconomyRate(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#15-bowler-mean-runs-conceded"></a>16. Bowler mean runs conceded</h3>
<div>
<pre>bowlerMeanRunsConceded(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#16-bowler-moving-average"></a>17. Bowler Moving Average</h3>
<div>
<pre>bowlerMovingAverage(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#17-bowler-cumulative-average-wickets"></a>18. Bowler cumulative average wickets</h3>
<div>
<pre>bowlerCumulativeAvgWickets(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#18-bowler-cumulative-economy-rate-er"></a>19. Bowler cumulative Economy Rate (ER)</h3>
<div>
<pre>bowlerCumulativeAvgEconRate(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#19-bowler-wicket-plot"></a>20. Bowler wicket plot</h3>
<div>
<pre>bowlerWicketPlot(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#20-bowler-wicket-against-opposition"></a>21. Bowler wicket against opposition</h3>
<div>
<pre>bowlerWicketsAgainstOpposition(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#21-bowler-wicket-at-cricket-grounds"></a>22. Bowler wicket at cricket grounds</h3>
<div>
<pre>bowlerWicketsVenue(<span>bowlerDF</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<h3><a target="_blank" rel="nofollow" href="https://github.com/tvganesh/yorkrIPLTemplate/blob/master/IPLBatsmanBowlerTemplate.Rmd#22-predict-number-of-deliveries-to-wickets"></a>23. Predict number of deliveries to wickets</h3>
<div>
<pre>setwd(<span><span>&quot;</span>./IPLMatches<span>&quot;</span></span>)
<span>bowlerDF1</span> <span>&lt;-</span> getDeliveryWickets(<span>team</span><span>=</span><span><span>&quot;</span>IPLTeam1<span>&quot;</span></span>,<span>dir</span><span>=</span><span><span>&quot;</span>.<span>&quot;</span></span>,<span>name</span><span>=</span><span><span>&quot;</span>bowlerName<span>&quot;</span></span>,<span>save</span><span>=</span><span>FALSE</span>)
bowlerWktsPredict(<span>bowlerDF1</span>,<span><span>&quot;</span>bowlerName<span>&quot;</span></span>)</pre>
</div>
<p> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/gigadom.wordpress.com/5325/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/gigadom.wordpress.com/5325/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://gigadom.wordpress.com/2017/03/04/analysis-of-ipl-t20-matches-with-yorkr-templates/"> R – Giga thoughts …</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/kWJLXDVySCE"></a></div>