Displaying 1 result from an estimated 1 matches for "mabslim".
2009 Sep 17
2
R functions with array arguments
Dear R users,
I'm trying to implement a self-defined function with multiple
arguments, one of which is an array, but I find that the result is a
single value instead of an array.
This is the example I'm working on:
# define integration limit vector
> Mabslim <- c(-17.95, -16.65, -17.27, -17.62, -16.76, -17.07, -17.02)
# Define function
> schech<-function(x,alpha,xstar) (10^(0.4*(alpha+1)*(xstar-
x))*exp(-10^(0.4*(xstar-x))))
# Define new function integrating the previous one
> my_gamma<-function(alpha,xstar,xlim,xmax)
integrate(sc...