Skip to content
Prev 35822 / 63424 Next

Confusing error message for [[.factor (PR#14209)

g.russell at eos-solutions.com wrote:
It didn't take particularly careful reading to find this:

  "The most important distinction between [, [[ and $ is that
   the [ can select more than one element whereas the other two
   select a single element."

Try this:

  c("a","b")[[c(1,2)]]
  c("a","b")[[TRUE]]

  -Peter Ehlers