I get
Error in ggplot(dfyear, aes(Years)) + geom_ribbon(aes(ymin = Low, ymax = High), : could not find function "+<-"
Years=1981:2020
Low=runif(40,min=50,max=100)
High=runif(40,100,200)
ETFValue=(Low+High)/2
dfyear=data.frame(Years,Low,High,ETFValue)
ggplot(dfyear, aes(Years)) +
geom_ribbon(aes(ymin=Low,ymax=High),fill="yellow") +
ylab=("ETF value") +
geom_line(aes(y=ETFValue),size=2,col="darkblue")
Change this line
to this
There isn't an
=sign between function name and parentheses