Selecting single elem. with [[ and $

Data frame example:

x <- data.frame(apple = c(10, 15), banana = c(20, 25), melon = c(30, 35))
x
##   apple banana melon
## 1    10     20    30
## 2    15     25    35
x[["melon"]]
## [1] 30 35
x$melon
## [1] 30 35