I have these code:
f <- function(x){y ~ poly(x, 4)}
integrate(f, lower = 670, upper = 750)
also tried the code below:
f <- function(x){y ~ poly(x, 4)}
integrate(Vectorize(f, lower = 670, upper = 750))
I also tried this code but at both codes i get this error:
Error in integrate(f, lower = 670, upper = 750) :
evaluation of function gave a result of wrong length
Any help is much appreciated.