ASK: For a company of your choice, create a vector of the company's closing stock price for the last 10 trading days and populate the vector with the appropriate data (from earliest to most recent).
For another company of your choice, create a second vector of the company's closing stock price for the last 10 trading days and populate the vector with the appropriate data (from earliest to most recent).
DATA:
APPL:
9/16/19 219.9
9/17/19 220.7
9/18/19 222.77
9/19/19 220.96
9/20/19 217.73
9/23/19 218.72
9/24/19 217.68
9/25/19 221.03
9/26/19 219.89
9/27/19 218.82
SSUN.F
9/16/19 747
9/17/19 740
9/18/19 747
9/19/19 762
9/20/19 776
9/23/19 768
9/24/19 766
9/25/19 756
9/26/19 762
9/27/19 753
I have been able to create the vector, i just do not know how to create a vector with corresponding date or how to then display that data after it has been created in order. My apologies, i do not have much and probably have it wrong. Any help would be appreciated
APPL<-c(227.26, 229.28, 232.07, 227.99, 224.29, 232.77, 226.87, 216.36, 214.45, 222.11)
SSUN<-c(739.93, 716.10, 696.92, 690, 685.96, 691, 675, 665.40, 684.39, 675.26)
Get Answers For Free
Most questions answered within 1 hours.