search for: advanced_function_r

Displaying 1 result from an estimated 1 matches for "advanced_function_r".

2010 Jan 23
1
How to apply a function on each column of a matrix
Hello everyone, I get for each date a measure for n elements in the form of a matrix. I am converting it to a ts object using ts(). I want to apply a function on each column. I started using the apply function ( set to 2) but what it returns is a matrix with the same columns representing the function applied on the last column of the initial matrix. I have been trying to use the sapply function or