Modelling team strengths often requires separate parameters for offence and defence. These helper functions provide a quick way to turn a factor of team names into a factor of offence or defence levels
off(x) def(x)
x | A factor containing team names |
---|
#> [1] off___Arsenal off___Liverpool off___Barcelona off___Dortmund #> Levels: off___Arsenal off___Barcelona off___Dortmund off___Liverpool#> [1] off___Arsenal off___Liverpool off___Barcelona off___Dortmund #> Levels: off___Arsenal off___Barcelona off___Dortmund off___Liverpool