Re: [Rd] 'vapply' not returning list element names when returned element is a length-1 list

2015-08-05 Thread Suharto Anggono Suharto Anggono via R-devel
Quote > If i have a function that returns a named list with 2 (or more) elements, > then using 'vapply' retains the names of the elements: > > But if the function only returns one element, then the name "foo" is lost vapply _always simplifies_ according to the documentation.

Re: [Rd] 'vapply' not returning list element names when returned element is a length-1 list

2015-08-05 Thread Dean Attali
Thank you, I do see that now. I still don't completely agree with the behaviour, I hoped there would be a way to not simplify, but thank you for pointing me to the fact that it is documented. --- http://deanattali.com On 5 August 2015 at 05:08, S Ellison wrote: > > > > -Original Message

Re: [Rd] 'vapply' not returning list element names when returned element is a length-1 list

2015-08-05 Thread S Ellison
> -Original Message- > From: R-devel [mailto:r-devel-boun...@r-project.org] On Behalf Of Dean Attali > If i have a function that returns a named list with 2 (or more) elements, > then using 'vapply' retains the names of the elements: > > But if the function only returns one element,