I'm calling apply(data, 2, function(x) {...})
where data
is a matrix. Is there any way for the function to know the name of the column whose values are present in x
? Or perhaps there's another function to accomplish the same task?
I'm calling apply(data, 2, function(x) {...})
where data
is a matrix. Is there any way for the function to know the name of the column whose values are present in x
? Or perhaps there's another function to accomplish the same task?