I'm not sure if this is the original wish or not, but I have run into the following situation:
I apply a function to a matrix, but the operation fails because the function expects a matrix (which in my mind is the one column or row at each go). The function doesn't see it that way because it only gets the data as a vector.
Personally, I'd favor forcing the user to write a wrapper function
that does as.matrix (possibly with a transpose) rather than cluttering
up apply.
Patrick Burns
Burns Statistics [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User")
Peter Dalgaard BSA wrote:
[EMAIL PROTECTED] writes:
Full_Name: Andreas Buness Version: 1.7.1 OS: Unix Submission from: (NULL) (193.174.53.122)
I would like to ask you to enhance the apply function
with an option drop=FALSE similar to the one existing
for subsetting of arrays. Or any other mechanism to get
control on the dimensionality of an object resulting from an apply call. This could facilitate more robust programming.
Don't you mean simplify=TRUE similar to sapply()? This has been suggested a couple of times. Or how do you intend 'drop' to work?
______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-devel