The fortune tellers sind offenbar nicht begeistert von der $-Notation zum Zugriff auf Dataframe-Spalten
Code: Alles auswählen
> fortune(312)
The problem here is that the $ notation is a
magical shortcut and like any other magic if used
incorrectly is likely to do the programmatic
equivalent of turning yourself into a toad.
-- Greg Snow (in response to a user that wanted
to access a column whose name is stored in y
via x$y rather than x[[y]])
R-help (February 2012)
Code: Alles auswählen
> fortune(343)
Sooner or later most R beginners are bitten by this
all too convenient shortcut. As an R newbie, think
of R as your bank account: overuse of $-extraction
can lead to undesirable consequences. It's best to
acquire the '[[' and '[' habit early.
-- Peter Ehlers (about the use of $-extraction)
R-help (March 2013)
Viele Grüße,
Bernhard