On Sat, 29 Dec 2012, Pindar wrote:
Am 28.12.2012 12:03, schrieb Pindar:
>
> I noticed that between command and function is a major difference:
> dummify dList -> works with a list
> dummify(dList, NA) -> only one series accepted
>
Same is true for 'corr'. Is that an intended systematic difference between
commands and functions?
Not really. In regard to corr() I think maybe that function predated
named lists, and I guess there's no reason it couldn't return a
matrix when given a list argument -- although there is the question
of what to do with the sample range issue (select a uniform sample
in case of NAs, or not?). And the mcorr() function is available for
producing a correlation matrix:
list L = whatever
matrix C = mcorr({L})
With regard to dummify, I'm not sure that accepting a list argument
is a great idea, since a (single) series argument already produces a
list result. Producing a "list of lists" seems to me on the verge of
being out of control.
Allin Cottrell