My data looks like the following:
All the columns are character types. I want to plot adjusted closing price across time. So, I convert the Date column to a Date class and the Adj.Close column to a numeric type.
data$Date <- as.Date(data$Date)
data$Adj.Close <- as.numeric(data$Adj.Close)
Next, I try to plot the variables
ggplot(data, aes(x = "Date", y = "Adj.Close")) + geom_line()
But, all I get is an empty grid. I've also tried converting the Date column to a time series data type with as.ts
but this gives me the same result.