Here is the code on it's own that works.
ggplot(stkPres, aes(x = AAPL, y = AAPL.ret)) + geom_point()
Here is my attempt at a function:
graphic.stock.vs.return <- function(abbrev) {
ggplot(stkPres, aes(x = abbrev, y = abbrev.ret)) + geom_point()
}
graphic.stock.vs.return(AAPL) would graph the exact same way as ggplot(stkPres, aes(x = AAPL, y = AAPL.ret)) + geom_point().
What do I need to do to my function for it to work properly?