I have a plot of calculations that I am plotting over a geom_point plot. The calculations run over aprox 87 days. Each calculation has a date to follow. Because there would be too many values on the x-axis I used a piece of script to vary over a 4 day interval in the plot.
scale_x_date(breaks = seq.Date(from = as.Date("2020-03-07"),
to = as.Date("2020-05-31"), by = 3)) +
Although I am getting an error saying date-trans does not work. I am unsure what this means.
Error: Invalid input: date_trans works with objects of class Date only
#[1] 0.00000000 0.00000000 0.00000000 0.00000000 0.02422924 0.02211847 0.02030373 0.01806205 0.01584046 0.04314234 0.04064545 0.04090086
#[13] 0.03584243 0.03330357 0.04097595 0.03623013 0.03346147 0.03044403 0.02866031 0.02693319 0.02832876 0.02419024 0.02097880 0.02126051
#[25] 0.02057323 0.02002243 0.02200681 0.02515222 0.02629810 0.03094984 0.04723567 0.04598012 0.04485712 0.05394273 0.05373836 0.06080055
#[37] 0.06151201 0.06280606 0.07320772 0.07831162 0.11061757 0.11001137 0.11005805 0.11595313 0.12176875 0.12839616 0.12741359 0.13085312
#[49] 0.13361390 0.13479076 0.13348272 0.13043844 0.13008776 0.13035932 0.12998105 0.13140665 0.13117472 0.12952669 0.13143115 0.13291106
#[61] 0.13272691 0.13297395 0.13299020 0.13217203 0.13298200 0.13275076 0.13353919 0.13256285 0.13346110 0.13316166 0.13284188 0.13289462
#[73] 0.13233296 0.13132838 0.13160375 0.13095548 0.13014803 0.13014475 0.12966564 0.13011536 0.13000045 0.12975505 0.12974519 0.12868537
#[85] 0.12879276 0.13161376
ggplot(results, aes(x = results$Date, y = results$CFR_Calculation)) +
scale_x_date(breaks = seq.Date(from = as.Date("2020-03-07"),
to = as.Date("2020-05-31"), by = 3)) +
geom_point() +
labs(x = "Date (In 4 Day Interval)", y = "CFR Calculation") +