I have ran code where I first filter variables and then run a plot, see code below
pl1 = mydata %>%
filter(CID =="1", NID =="1", SID =="301", WID =="1")
ggplot(pl1, aes(x=Timestamp, y=T_Var , colour=SID)) +
geom_line() +
geom_hline(yintercept=.4, linetype="dashed", color = "red") +
geom_hline(yintercept=.7, linetype="dashed", color = "maroon")
Were each of the of the filtered items are as follows CID from 1 - 30 NID from 1 - 8 SID from 301 - 310 WID from 1 - 9 T_Var is the target variable
I know this is a lot of plots, but I was wondering if this can be done with a for loop.
print()the ggplot object within the loop.