scatter <- ggplot(examData, aes(Anxiety, Exam))
scatter + geom_point(aes(colour = Gender)) + geom_smooth(method = "lm")
If i execute the commands above, the graph shows up correctly with different color dots, however, if I follow my textbook and execute the commands below, I don't see different color dots.
satter <- ggplot(examData, aes(Anxiety, Exam, colour = Gender))
scatter + geom_point() + geom_smooth(method = "lm")
Can anyone help me (a absolute beginner) understand what am I doing wrong?
Thank you.
If you have figured out the answer your question, please post the code that worked as a separate post in the thread and mark it as correct rather than adding "solved" to your question title.
Thank you for reminding me.
sc atter <- ggplot(examData, aes(Anxiety, Exam, colour = Gender))
scatter + geom_point() + geom_smooth(method = "lm")
I found that I misspelled scatter as satter.
cderv
March 1, 2018, 6:45am
4
As your question have a solution, can you mark your topic as solved then ?
If your question has been answered, don't forget to mark the solution!
How do I mark a solution?
Find the reply you want to mark as the solution and look for the row of small gray icons at the bottom of that reply. Click the one that looks like a box with a checkmark in it:
[image]
Hovering over the mark solution button shows the label, "Select if this reply solves the problem". If you don't see the mark solution button, try clicking the three dots button ( ••• ) to expand the full set of options.
When a solution is chosen, the icon turns green and the hover label changes to: "Unselect if this reply no longer solves the problem". Success!
[solution_reply_author]
…
Thank you.
1 Like