R/findPlayerSet.R

Defines functions findPlayerSet

findPlayerSet <-
function(player, goalkeeper = TRUE, exact = TRUE, pendat)
  {
    select = 
      if (goalkeeper & exact) which(pendat$goalkeeper == player)
      else if (goalkeeper & !exact) grep(player, pendat$goalkeeper, fixed = TRUE)
      else if (!goalkeeper & exact) which(pendat$penaltytaker == player)
      else grep(player, pendat$penaltytaker, fixed = TRUE)
    select
  }

Try the footballpenaltiesBL package in your browser

Any scripts or data that you put into this service are public.

footballpenaltiesBL documentation built on March 17, 2021, 5:07 p.m.