Plotting code error

I am facing a problem with the following code.

plot(KM2, xlab= "time (years)", ylab= "OS",, xlim=c(0,40))
lines(time, S.fit0, type =l, lty = 1, col = 2)
abline(h=0.08, lwd=2)

whenever I try to run it, the following error appears:

Error in plot.xy(xy.coords(x, y), type = type, ...) :
object 'l' not found

Please help me.. thank you

You are missing quotes here

lines(time, S.fit0, type ="l", lty = 1, col = 2)

If you need more specific help, please provide a proper REPRoducible EXample (reprex) illustrating your issue.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.