“独特”的错误?当'nmax'比唯一值的数量小1时,不会出错

时间:2018-11-21 23:10:18

标签: r vector unique

已在R 3.5.0上对此进行了测试。

set.seed(0)
x <- rexp(100)
length(unique(x))  ## 100

## this fails as I expect
unique(x, nmax = 98)
#Error in unique.default(x, nmax = 98) : hash table is full

## but how come does this succeed?
length(unique(x, nmax = 99))  ## 100

0 个答案:

没有答案