Hi @Descartes19!
Like @AJF suggested, I suspect this part isn't working at all. I'm guessing you tried this line in order to try to follow this bit from @josiah's answer?
This is understandably confusing when you're new, but that part of @josiah's answer wasn't meant to be copied directly. That bit just creates some example data so that the code in the answer would run (since we don't have access to your CSV file).
You should keep the CSV import code you had before, assuming it seems to be working
A very simple way to check if the data got imported as you expect: after you run this line…
OTC<-read.csv(file.choose())
…try running both of these lines. The first will print a summary of the columns and their data types for OTC (your data frame of imported data), and the second will open up OTC in a spreadsheet-like view for you to inspect directly:
str(OTC)
View(OTC)
So to try @josiah's answer on your own data, you'd want something like this:
OTC <- read.csv(file.choose())
OTC %>%
mutate(Date = lubridate::mdy(Date)) %>%
gather(metric, value, -Date) %>%
ggplot(aes(Date, value, color = metric)) +
geom_line()
Do you mean you want both bars and lines on the same plot? Or do you want to make different plots from the same data? (Both are possible!
)