% Generated by roxygen2: do not edit by hand
\name{$}
\alias{$}
\alias{[}
\alias{[[}
\alias{getElement}
\title{Extract or Replace}
\details{
Extract elements of a vector
\code{
letters[1]
letters[1:10]
}

Extract elements of a matrix
\code{
A <- matrix(1:9, nrow = 3)
A[1, 2]
A[1,] # returns a vector
A[1, , drop = FALSE] # returns a matrix
}

Extract elements of a list
\code{
x <- list(a = 1:10, b = pi, c = letters)
x[1]
x[[1]]
x[["a"]]
x$a
}

Replace elements
\code{
A[1, 1] <- 0
x[[3]] <- LETTERS
}}

