[R] two questions for R beginners

Jim Lemon jim at bitwrit.com.au
Mon Mar 1 23:44:22 CET 2010


On 03/02/2010 02:02 AM, Karl Ove Hufthammer wrote:
>...
> Of course I agree that 'the idea of a list is so fundamental to R that
> it needs to be something learned pretty early', but is there any harm in
> slightly 'blur[ing] the distinction between dataframes and matrices', as
> a convenience to the user? Or, in other words, what does one *gain* by
> having '$' on named matrices and vectors give a confusing error message
> instead of the expected results? Dinstinction for dinstinction's own
> sake is of little use.
>

Matrices are all one type, from finish back to start,
while lists can manage many just by keeping them apart.
Like foxes, geese and corn that must be ferried 'cross the Styx,
it's not a good idea to let the separate columns mix.
So yield not to temptation when the two appear to match,
for appearances mislead and in the substance lies the catch.
Convenience is a quicksand that can suck the user down.
'Tis better to avoid the stuff and know one's way around.

Jim



More information about the R-help mailing list