Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!