Question: I have this data already in long format suitable for ggplot 2 . I am using this R code to plot cumulative returns of all
I have this data already in long format suitable for ggplot I am using this R code to plot cumulative returns of all stocks in graph. Can you provide the R code. Mine keeps giving error "geompath: Each group consists of only one observation. Do you need to adjust the group aesthetic?" WHy?
ggplotmergeddatalong, aesx Date, y CumulativeReturn, color Stock
geomline
labstitle "Cumulative Returns of AAPL and TSLA",
x "Date",
y "Cumulative Returns",
color "Stock"
thememinimalte Stock CumulativeReturn
Data below:
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
AAPL
TSLA
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
