Fixed!
I was not passing a tol value from the outer function to the inner
qnbinom() function. Because the scope of tol in qbinom() was confined to
the outer function, qnbinom was not accessing the globally defined tol
value. Furthermore, because the outer function itself was embedded in
integrate()
В Tue, 18 Jul 2023 09:28:30 -0400
Joseph Lucke пишет:
> Error in qnbinom(1 - tol, size = q, prob = r) :
> pRsq.Rhosq <- function(x, n, p, Rhosq,tol=tol){
It looks like you're not passing the `tol` parameter, and its default
value unfortunately refers to itself:
(function(x = x) x)()
# Error in
A repost.
R gurus:
I have a 10 or so functions that use R’s qnbinom() function. Until now,
they have worked without any problems whatsoever.
I created a new function, which involved the integration, using R’s
integrate(), of a function that in turn uses the qnbinom() function.
The function failed b
3 matches
Mail list logo