From pburns at pburns.seanet.com  Fri Aug  8 21:45:53 2003
From: pburns at pburns.seanet.com (Patrick Burns)
Date: Fri Aug  8 21:46:04 2003
Subject: [Rd] Wish (PR#3690)
References: <200308081350.h78DoTJH023394@pubhealth.ku.dk>
	<x2u18si5oa.fsf@biostat.ku.dk>
Message-ID: <3F33FDF1.2070906@pburns.seanet.com>

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@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@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?
>
>  
>


[Rd] Wish (PR#3690)
Patrick Burns