为什么在 `cv.glm` 中是 `sample0` 而不是 `sample`?
Why is it `sample0` not `sample` inside `cv.glm`?
我正在查看 boot
中 cv.glm
的源代码。有一行
s <- sample0(rep(1L:K, f), n)
我查了 sample0
,但它不存在。我相信它真的意味着 sample()
。为什么这里输入为sample0
?
看看:
boot:::sample0
#function (x, ...)
#x[sample.int(length(x), ...)]
#<bytecode: 0xa2a30e4>
#<environment: namespace:boot>
这是 boot
命名空间中的内部/非导出函数。
我正在查看 boot
中 cv.glm
的源代码。有一行
s <- sample0(rep(1L:K, f), n)
我查了 sample0
,但它不存在。我相信它真的意味着 sample()
。为什么这里输入为sample0
?
看看:
boot:::sample0
#function (x, ...)
#x[sample.int(length(x), ...)]
#<bytecode: 0xa2a30e4>
#<environment: namespace:boot>
这是 boot
命名空间中的内部/非导出函数。