RobinHankin / hyper2

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

replacement method for hyper2 objects too lax #226

Open RobinHankin opened 8 months ago

RobinHankin commented 8 months ago

If I try to overwrite a single term of a hyper2 object with a vector of length $>1$ I would expect an error. But:

library("hyper2")
[snip]
icons["L"] <- 1000:1001
icons
#> Warning in print.hyper2(x): powers have nonzero sum
#> log(L^1000 * (L + NB + OA + THC)^-20 * (L + NB + OA + WAIS)^-9 * (L +
#> NB + THC + WAIS)^-15 * (L + OA + PB + THC)^-11 * (L + OA + PB +
#> WAIS)^-18 * (L + PB + THC + WAIS)^-16 * NB^32 * (NB + OA + PB +
#> THC)^-18 * (NB + OA + PB + WAIS)^-8 * (NB + PB + THC + WAIS)^-18 *
#> OA^14 * PB^30 * THC^24 * WAIS^9)

The second element, viz 1001, is silently ignored.