I am new to R and am working on a class assignment. When I type in:
points(density(rainwater$ph, adjust = 2), type = "l")
I get the error message:
Error in plot.xy(xy.coords(x, y), type = type, ...) : invalid plot type
But when I copy and paste the command from a PDF file, it works correctly. I have made sure what I type exactly matches the copy and pasted command. Can anyone tell me why typing in the exact command is not working but copy and pasting does?
Thanks for the help!