R/rot_vector.R

Defines functions rot_vector

Documented in rot_vector

#'Rotate vector
#'
#'Helper function to rotate vector
#'
#'@param lineup_vec A vector of lineup data
#'@importFrom stats lag
#'@export
rot_vector <- function(lineup_vec){
  lineup_vec1 <- lag(lineup_vec)
  lineup_vec1[1] <- lineup_vec[length(lineup_vec)]
  lineup_vec <- lineup_vec1
}

Try the r4lineups package in your browser

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

r4lineups documentation built on May 2, 2019, 7:10 a.m.