I'm working on the following code:
temperatura<-function(t){6/pi*atan(40*t-740)+7}#temperatura em função do tempo
Ratkowski<-function(t){0.04291^2*(temperatura(t)-3.57877)^2*(1-exp(1.13744*(temperatura(t)-41.64632)))^2}#modelo dinâmico
fq<-function(t){0.1*exp(Ratkowski(t))}
funcao<-function(t){integrate(fq,0,t)}
I'm trying to build a new function defined as
funcao02<-function(t){funcao(t)/(funcao(t)+1)}
The following error is being generated:
Error in function + 1: non-numeric argument for binary operator
I believe that the value of funcao (resultado da integral)
is not being considered numeric. That's right? How do I solve the problem?