elo.run.helpers

0th

Percentile

Helper functions for elo.run

as.matrix converts an Elo object into a matrix of running Elos.

Usage
# S3 method for elo.run
as.matrix(x, ..., group = x$group)

# S3 method for elo.run.regressed as.matrix(x, ..., group = x$group)

# S3 method for elo.run as.data.frame(x, ...)

final.elos(x, ...)

# S3 method for elo.run final.elos(x, ...)

# S3 method for elo.run.regressed final.elos(x, regressed = FALSE, ...)

Arguments
x

An object of class "elo.run" or class "elo.run.regressed".

...

Other arguments (Not in use at this time).

group

A grouping vector, telling which rows to output in the matrix.

regressed

Logical, denoting whether to use the post-regressed (TRUE) or pre-regressed (FALSE) final Elos. Note that TRUE only makes sense when the final Elos were regressed one last time (i.e., if the last element of the regress()) vector yields TRUE).

Details

as.data.frame converts the "elos" component of an object from elo.run into a data.frame.

final.elos is a generic function to extract the last Elo per team.

Value

A matrix, a data.frame, or a named vector.

See Also

elo.run

Aliases
  • elo.run.helpers
  • as.matrix.elo.run
  • as.matrix.elo.run.regressed
  • as.data.frame.elo.run
  • final.elos
  • final.elos.elo.run
  • final.elos.elo.run.regressed
Examples
# NOT RUN {
e <- elo.run(score(points.Home, points.Visitor) ~ team.Home + team.Visitor + group(week),
             data = tournament, k = 20)
head(as.matrix(e))
str(as.data.frame(e))
final.elos(e)
# }
Documentation reproduced from package elo, version 2.0.0, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.