Plotting
x <- seq(-5, 5, length.out = 51)
x
## [1] -5.0 -4.8 -4.6 -4.4 -4.2 -4.0 -3.8 -3.6 -3.4 -3.2 -3.0 -2.8 -2.6 -2.4 -2.2
## [16] -2.0 -1.8 -1.6 -1.4 -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0.0 0.2 0.4 0.6 0.8
## [31] 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8
## [46] 4.0 4.2 4.4 4.6 4.8 5.0
plot(x, x ^ 2, type='l', ylim = c(-25, 25), col='steelblue')
lines(x, x ^ 3, col='darkgreen')

library(quantmod)
## Warning: package 'quantmod' was built under R version 3.6.2
## Loading required package: xts
## Loading required package: zoo
##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Loading required package: TTR
## Warning: package 'TTR' was built under R version 3.6.2
## Registered S3 method overwritten by 'quantmod':
## method from
## as.zoo.data.frame zoo
quantmod::getSymbols(c("AAPL", "GOOG"))
## 'getSymbols' currently uses auto.assign=TRUE by default, but will
## use auto.assign=FALSE in 0.5-0. You will still be able to use
## 'loadSymbols' to automatically load data. getOption("getSymbols.env")
## and getOption("getSymbols.auto.assign") will still be checked for
## alternate defaults.
##
## This message is shown once per session and may be disabled by setting
## options("getSymbols.warning4.0"=FALSE). See ?getSymbols for details.
## [1] "AAPL" "GOOG"
class(GOOG['2007']$GOOG.Open)
## [1] "xts" "zoo"
plot(GOOG['2007']$GOOG.High, col='steelblue')
lines(GOOG['2007']$GOOG.Low, col='purple')

as.numeric(GOOG['2007-01-03', 'GOOG.Open'])
## [1] 232.1299
head(GOOG$GOOG.Open / 10)
## GOOG.Open
## 2007-01-03 23.21299
## 2007-01-04 23.36243
## 2007-01-05 24.03491
## 2007-01-08 24.29344
## 2007-01-09 24.18186
## 2007-01-10 24.13105