<jupyter_start><jupyter_text>Simple Stock Plots in R<jupyter_code>library(quantmod)
library(TTR)
getSymbols('AAPL', src = 'yahoo', from = as.Date('2019-01-01'), to = as.Date('2020-01-01'))
AAPL <- na.omit(AAPL)
head(AAPL)
plot(Cl(AAPL), main="Line Chart of Apple", xlab="Date")
barplot(Cl(AAPL), main="Bar Chart of Apple",
   xlab="Date")
barplot(Cl(AAPL), main="Bar Chart of Apple", horiz=TRUE, ylab="Date")
AAPL.DF<-data.frame(Date=index(AAPL),coredata(AAPL))
AAPL.DF
x = AAPL.DF[,'AAPL.Open']
y = AAPL.DF[,'AAPL.Close']
x = AAPL.DF['AAPL.Open']
y = AAPL.DF['AAPL.Close']
library(ggplot2)
ggplot(AAPL, aes(x=AAPL.Open, y=AAPL.Close)) + ggtitle("Scatterplot Open vs Close") +
  geom_point()<jupyter_output><empty_output>
StarcoderdataJupyterStructuredCleanDedup