4
我不知道爲什麼all.equal()
不適用於下列數據返回TRUE:all.equal()在R基本沒有返回TRUE
Like.prob = dbinom(x = 0:2, size = 2, prob = .7)
sim.obs = rbinom(n = 1e6, size = 2, prob = .7)
sim.Like.prob = unname(table(sim.obs)/1e6)[1:3]
all.equal(Like.prob, sim.Like.prob, tolerance = .01) ## Here I expect a TRUE
嗨RockScience,我想知道,如果你可能知道答案[*這個有趣的問題*](https://stackoverflow.com/questions/47857624/r-function-that-uses-its-輸出作爲其通自有輸入多次)? – Reza