need help with how to do a scatter graph I am freaking out.

Does any know how to do the scatter plot for my report that is due on the 9th of may and I am freaking out.. I have the data but I don't know how to plot a scatterplot in R studio.

Hi, welcome to the forum.

Here are examples of two different ways to do a scatterplot

# Create some data --------------------------------------------------------

dat1 <- data.frame(aa = 1:10, bb = rnorm(10))


# Plot using basic R graphics ---------------------------------------------
with(dat1, plot(aa, bb))

# Plot using the ggplot2 package ------------------------------------------
library(ggplot2)
ggplot(dat1, aes(x = aa, y = bb)) + geom_point()

ok let me try and see if it helps.

Also how do you calculate the ANOVA on the data I have? I don't know how to do it.

We need to know what your data looks like before we can say. A handy way to supply data is to use the dput() function. Do dput(mydata) where "mydata" is the name of your dataset. For really large datasets probably dput(head(mydata, 100) is enough. Paste it here between

```

```

You may also find this helpful.

1 Like