keep: Keep or discard players

keepR Documentation

Keep or discard players

Description

Flawed functionality to keep or discard subsets of the players in a hyper2 object or order table.

Usage

discard_flawed2(x, unwanted,...)
keep_flawed(H, wanted)
discard_flawed(H, unwanted)

Arguments

H

A hyper2 object

x

An order table

wanted,unwanted

Players to keep or discard. May be character or integer or logical

...

Further arguments passed to wikitable_to_ranktable(), notably points

Details

Do not use these functions. They are here as object lessons in poor thinking. To work with a subset of competitors, see the example at as.ordertable.Rd.

Functions keep_flawed2() and discard_flawed2() take an order table and keep or discard specified rows, returning a reduced order table. This is not a trivial operation.

Functions keep_flawed() and discard_flawed() will either keep or discard players specified in the second argument. It is not clear to me that these functions have any reasonable probabilistic interpretation and file inst/retain.Rmd gives a discussion.

Given a wikitable or ordertable, it is possible to create a likelihood function based on a subset of rows using the incomplete=TRUE argument; see the example at ?ordertable2supp. But this method is flawed too because it treats non-finishers as if they finished in the order of their rows.

Function as.ordertable() is the correct way to consider a subset of players in a wikitable.

Author(s)

Robin K. S. Hankin

See Also

ordertable2supp,tidy

Examples


maxp(icons)
discard_flawed(icons,c("OA","WAIS"))

## Not run: # (takes too long)
data("skating")
maxp(skating)[1:4]      # numbers work, keep the first four skaters
maxp(keep_flawed(skating,pnames(skating)[1:4])) # differs!

## End(Not run)



hyper2 documentation built on Aug. 21, 2022, 1:05 a.m.