Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Change element of vector

colors = c("red", "blue", "green")
colors    # "red", "blue", "green"
colors[1] # red
colors[1] = "purple"
colors # "purple", "blue", "green"