ted: library(RMariaDB) mydb <- dbConnect(MariaDB(), user='student', password='cosc4347', dbname='SP500', host='oceanplatform0.cdb7tnix15tn.us-west-2.rds.amazonaws.com') mystock <- "*your stock ticker here*" sql <- paste("SELECT SUBSTRING(QtTime,1,10), A
I dont really know where to start. So please can someone help me out.
Use the Class
I would like to use Walmart as the stock Ticker: WMT. Thank you.
Use the following R code to get started:
library(RMariaDB)
mydb <- dbConnect(MariaDB(), user='student', password='cosc4347', dbname='SP500', host='oceanplatform0.cdb7tnix15tn.us-west-2.rds.amazonaws.com')
mystock <- "*your stock ticker here*"
sql <- paste("SELECT SUBSTRING(QtTime,1,10), AVG(QtPrice) FROM Quotes WHERE QtSymbol='", mystock, "' GROUP BY SUBSTRING(QtTime,1,10)", sep="")
rs = dbSendQuery(mydb, sql)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
How would I go about writing the code to get the data that's in the
We have these packages
# Now let's install a few packages for the Introduction to R lecture
install.packages(c("dplyr", "e1071", "reshape2", "ggplot2", "zoo"))