Message-ID: <CAAmySGM63+N2kynu6n-CLvedZRKVvM4bxdKnAgw3DD0OSsQRMQ@mail.gmail.com>
Date: 2012-09-15T19:23:12Z
From: R. Michael Weylandt
Subject: $ operator is invalid for atomic vectors
In-Reply-To: <5054D3BF.6020402@gmail.com>
> 2) Make the vector a list. I don't know if there are side-Effects to
> this, but perhaps it's just the anxiety of a Java-Programmer who isn't
> used to the somewhat easy-going way R deals with classes:
> class(dataf2) <- "list"
Indeed, there are _many_ side effects to this and you really should
read up on the differences, but this really is a bad idea in general.
To make it _very_ short, (atomic = regular) vector is a regular array
while a list is an associative array.
Cheers,
Michael