I would like to integrate a function with respect to x
,
FUN1 <- function(x, alpha, beta){
x * alpha - beta
}
FUN2 <- function(alpha beta){
integrate(FUN1(x, alpha,beta), 0,1)
}
But it does not work.
I also tried
FUN2 <- function(alpha beta){
integrate(FUN1, 0,1)
}
It does not work either.