I have the following dataset
TSSdata.dat = structure(list(Date = c("2022-08-05", "2022-08-18", "2022-02-23",
"2022-09-09", "2022-09-25", "2022-10-12", "2022-11-06", "2023-04-29",
"2023-05-19", "2023-06-24", "2023-06-29", "2023-07-09", "2023-07-26"),
C1In1 = c(NA, 8.794, NA, 9.38, 8.86, 4.866, 5.124, 250, 484.63,
1107.53, 821.92, 367.5, 1265.6),
C1In2 = c(NA, 8.794, NA, NA, 8.66, NA, NA, 70.59,
NA, NA, NA, NA, NA),
C1Out = c(NA, 8.898, NA, 8.9, 7.98, 4.28, 4.88,
91.95, 197.91, 196.26, 367.92, 317.3, 433.3),
C2In = c(NA, NA, NA, 8.64, NA, 4.38, NA, 313.87, NA,
233.01, NA, NA, 788.6),
C2Out = c(NA, NA, NA, 8.5, NA, 4.21, NA, 237.7, NA,
162.16, NA, NA, 117.2),
C3In = c(NA, 8.52, 9.1, 8.5, 4.21, 4.46, NA, 98.16,
4494.04, NA, NA, NA, 606.6),
C3Out = c(NA, 8.96, 8.85, 4.23, 4.48, 4.54, NA,
57.43, 2487.91, NA, NA, NA, 447.6)),
row.names = c(NA, 13L),
class = "data.frame")```
I want to create a line graph (with points representing the observations) with a different colored line for each site (i.e., C1In1 as "darkblue", C1In2 as "blue", C1Out as "lightblue", C2In as "red", C2Out as "pink", C3In as "darkgreen", and C3 out as "lightgreen").
I tried running the code
plot(TSSdata.dat$Date, TSSdata$C1In1, type = "l", col = "darkblue", xlab = "Date", ylab = "TSS Concentration (mg/L)")
However, I am now getting the error:
> Error in plot.window(...) : need finite 'xlim' values
In addition: Warning messages:
1: In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
Does anyone have any advice on how to produce this plot?
This is my current plot, but I would like to show it as a line graph rather than a bar plot.
![image|639x500](upload://P1hfJBpqRLmxylvsohitnqHJTZ.png)