Skip to content

Commit

Permalink
Correction example
Browse files Browse the repository at this point in the history
  • Loading branch information
pedroguarderas committed Oct 26, 2023
1 parent 3bdbb5a commit e6ae9f1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/rating_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@
#' @author Pedro Guarderas
#' \email{pedro.felipe.guarderas@@gmail.com}
#' @examples
#' # Example without ties
#' n <- matrix( 1, 5, 5 )
#' d <- 10
#' n <- matrix( sample( x = 0:5, size = d * d, replace = TRUE ), d, d )
#' n <- n + t( n )
#' diag( n ) <- 0
#' g <- rep( 4, 5 )
#' g <- rowSums( n )
#' # Number of win matches for each team
#' w <- c( 0, 4, 0, 0, 2 )
#' # w <- sapply( 1:d, FUN = function( i ) sample( x = 1:g[i], size = 1, replace = TRUE ) )
#' # Number of lost matches for ech team
#' l <- c( 4, 0, 0, 2, 0 )
#' r <- colley_rating( n, g, w, l )
#' l <- rowSums( n ) - w
#' r <- colley_rating( n, w, l )
#' @export
colley_rating <- function( n, w, l, t = NULL ) {

Expand Down

0 comments on commit e6ae9f1

Please sign in to comment.