I have tried trouble shooting this error I am getting and I can't seem to fix it, any help would be appreciated.
Here is the code:
wq.fn<-function(l,m,c)
{
ro=((l)/(m*c))
if( ro>=1) return(NA)
r=l/m
if(ro<1)
{
b=r^c/(factorial(c)*(1-ro))
a=0
for(n in 0:(c-1))
{
a=a+((r^n)/factorial(n))
}
po=1/(a+b)
wq=(r^c/(factorial(c)*(c*m)*((1-ro)^2)))*po
return(wq)
}}
Tried using is.na and same error occured.