I'm not familiarized with the apply in R. When I try to return just one value of the function, it can't return that. This problem might be very easy to solve, but I'm not getting to it.
For example, when I try with the function sens.slope (From package trend ), it won't return just one numeric value.
> e <- matrix(1:50, nrow = 5)
> apply(e,2, sens.slope$estimates)
Error in sens.slope$estimates :
object of type 'closure' is not subsettable
Is there another solution? Thank you!