ggplot2 viz difficulty

I wrote this chunk but unable to visualize. Is anything wrong with the syntax
ggplot(quartet,aes(x,y) + geom_point() + geom_smooth(method=1m,se=FALSE) + facet_wrap(-set))

The brackets are in the wrong place:

ggplot(quartet,aes(x,y)) + geom_point() + geom_smooth(method=1m,se=FALSE) + facet_wrap(-set)

Many thanks Martin.
Tried changing the brackets still wouldn't work

The syntax is correct now, but it's impossible to help you if you just say it doesn't work.

FAQ: How to do a minimal reproducible example ( reprex ) for beginners - meta / Guides & FAQs - Posit Forum (formerly RStudio Community)

Hi Martin,
Thanks again for your time.

Below is the error message:
ggplot(quartet,aes(x,y)) + geom_point() + geom_smooth(method=1m,se=FALSE) + facet_wrap(-set)
Error: unexpected symbol in "ggplot(quartet,aes(x,y)) + geom_point() + geom_smooth(method=1m"

if you want a linear model; that would be lm rather than 1m

Oh! now I git it!
Cheers bro!

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.