RobinHankin / hyper2

https://robinhankin.github.io/hyper2/
5 stars 3 forks source link

ordertable2supp_new() #237

Closed RobinHankin closed 3 months ago

RobinHankin commented 3 months ago

Functions ordertable2supp_new() and complete() are not exported or used anywhere in the package. I am not sure why I added them (this was commit 7e02d6a). File podium.Rmd, which was edited in 7302d6a does not use ordertable2supp_new() or complete(), and compiles correctly (following eb8f545). In any event, ordertable2supp_new() fails on a standard use-case:

library("hyper2")
#> Loading required package: cubature
ignore <- ordertable2supp(F1_table_2016) # this works fine
ordertable2supp_new(F1_table_2016)       # fails
#> Warning in sort(v[v > 0]) == seq_along(v): longer object length is not a
#> multiple of shorter object length
#> Error in FUN(newX[, i], ...): some ranks missing

And indeed complete() fails too:

library("hyper2")
#> Loading required package: cubature
complete(F1_table_2016)
#> Warning in sort(v[v > 0]) == seq_along(v): longer object length is not a
#> multiple of shorter object length
#> Error in FUN(newX[, i], ...): some ranks missing

I think ordertable2supp_new() was written in an attempt to shorten ordertable2supp(), and to separate dealing with different types of no-score (Ret for "retired", WD for "withdrawn" etc) from the incomplete ranks issue and the basic looping functionality. But it was never tested or used.