ggplot2 error message for Hidden Markov Models

Hi,

So, without downloading the data and going through the whole tutorial, I just saw the image that they posted for head(HMMpost), and it looks like the variables are state, S1, S2, and S3.

I assume Date is in there, since they plot it as well, but, if I create a dummy dataset with Date in it, I can't reproduce your error:

library(tidyverse)
today <- lubridate::today()

Date <- today - (seq(1:20))
S1 <- runif(20)

HMMpost <- tibble(Date, S1)


ggplot(data = HMMpost, aes(x = Date, y = S1))+
  geom_line(color = "#00AFBB", size = 2)

Created on 2019-03-21 by the reprex package (v0.2.1)

Since your issue is with the plotting, could you create a small, self-contained reprex (short for reproducible example) with a sample of the data?

install.packages("reprex")

There's a nice FAQ on how to do a minimal reprex for beginners, below:

What to do if you run into clipboard problems

If you run into problems with access to your clipboard, you can specify an outfile for the reprex, and then copy and paste the contents into the forum.

reprex::reprex(input = "fruits_stringdist.R", outfile = "fruits_stringdist.md")

For pointers specific to the community site, check out the reprex FAQ.