**subscribe to the RSS feed**for updates on this topic.

### Indexing Vectors

**x[n]**nth element**x[-n]**all but the nth element**x[1:n]**first n elements**x[-(1:n)]**elements from n+1 to the end**x[c(1,4,2)]**specific elements**x[“name”]**element named “name”**x[x > 3]**all elements greater than 3**x[x > 3 & x < 5]**all elements between 3 and 5**x[x %in% c(“a”,”and”,”the”)]**elements in the given set

### Indexing Lists

**x[n]**list with elements n**x[[n]]**nth element of the list**x[[“name”]]**element of the list named “name”**xname**id