[Rd] Wish (PR#3690)

Patrick Burns pburns at pburns.seanet.com
Fri Aug 8 21:45:53 MEST 2003


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
patrick at burns-stat.com
+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:

>a.buness at dkfz.de 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?
>
>  
>



More information about the R-devel mailing list