##########################################################################################
# Designed and developed by Tinniam V Ganesh
# Date : 5 Jan 2021
# Function: getIPLBowlingDetails
# This function creates IPL bowling details
#
###########################################################################################
#' @title
#' Gets the IPL bowling details
#'
#' @description
#' This function creates a single datframe of all IPL bowling
#' @usage
#' getIPLBowlingDetails(dir='.',odir=".")
#'
#' @param dir
#' The input directory
#'
#' @param odir
#' The output directory
#'
#'
#' @references
#' \url{https://cricsheet.org/}\cr
#' \url{https://gigadom.in/}\cr
#' \url{https://github.com/tvganesh/yorkrData/}
#'
#' @author
#' Tinniam V Ganesh
#' @note
#' Maintainer: Tinniam V Ganesh \email{tvganesh.85@gmail.com}
#'
#'
#' @seealso
#' \code{\link{getIPLBattingDetails}}\cr
#' \code{\link{getIPLBowlingDetails}}\cr
#' \code{\link{getNTBBattingDetails}}\cr
#' \code{\link{getNTBBowlingDetails}}\cr
#' @export
#'
getIPLBowlingDetails <- function(dir='.',odir=".") {
bowlingDetails=bowler=wickets=economyRate=matches=meanWickets=meanER=totalWickets=NULL
currDir= getwd()
teams <-c("Chennai Super Kings","Delhi Capitals","Deccan Chargers","Delhi Daredevils",
"Kings XI Punjab","Punjab Kings", 'Kochi Tuskers Kerala',"Kolkata Knight Riders",
"Mumbai Indians", "Pune Warriors","Rajasthan Royals",
"Royal Challengers Bangalore","Sunrisers Hyderabad","Gujarat Lions",
"Rising Pune Supergiants","Lucknow Super Giants","Gujarat Titans")
# Get all bowling details
details=df=NULL
teams1 <- NULL
for(team in teams){
print(team)
tryCatch({
bowling <- getTeamBowlingDetails(team,dir=dir, save=TRUE,odir=odir)
teams1 <- c(teams1,team)
},
error = function(e) {
print("No data")
}
)
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.