Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I have this code right now: library(quantmod) getSymbols(Symbols=SPY, from=2012-01-01, to= 2013-12-31) SPY=data.frame(SPY) Data=matrix(SPY$SPY.Adjusted, ncol=10, byrow=T) df=data.frame(Data) next I am supposed to Calculate the mean and
I have this code right now:
library("quantmod")
getSymbols(Symbols="SPY", from="2012-01-01", to= "2013-12-31")
SPY=data.frame(SPY)
Data=matrix(SPY$SPY.Adjusted, ncol=10, byrow=T)
df=data.frame(Data)
next I am supposed to Calculate the mean and standard deviation of each column. Store the result in another data frame and print out this data frame in a nice table. I have been looking at this for hours and am very stuck. Thank you in advance!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started