Sunday 29 January 2017

What is the difference between [ ] and [[ ]] in R?

  > levels(state.region)[2]
[1] "S"
> levels(state.region)[[2]]
[1] "S"


They return the same value, so I don't know what is the difference between them.

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...