I am trying to plot a longer version of this:
From a file editor:
Date, Price
" 43,698 ", 113.000
" 43,699 ", 112.875
" 43,700 ", 113.125
" 43,701 ", 113.375
" 43,702 ", 113.625
" 43,703 ", 113.875
" 43,704 ",
" 43,705 ", 114.125
" 43,706 ", 114.750
" 43,707 ", 115.000
My code is:
library(tidyverse)
southsea <- read_csv("C:/Users/Kevin/OneDrive/Documents/Open University/Research/south sea bubble/southseatest.csv")
southsea <- filter(southsea,Price > 0)
southsea$Date <-as.Date(southsea$Date, origin= "1899-12-30")
ggplot(data= southsea, aes(x=Date,y=Price, group = 1 ))+
geom_line()
The graph I'm getting of that short list above is [Note - this image is supposed to be just the 10 items above]:
The structure is showing the dates as chr - might that be the cause? In which case, how do I convert just that column to date (or number) format?
Thanks,
Kevin