0
River Elevation DissolvedOxygen
Whanganui River upland 10.6
Whanganui River upland 10.7
Opai River lowland 10.65
Opai River lowland 10.75

Im simply trying to create a side by side boxplot of DissolvedOxygen in the upland and lowland elevations. But im having real trouble creating a boxplot of DissolvedOxygen where Elevation == "upland" or "lowland". This is for an assignment but none of the course materials has covered how to do this and my google searches are giving me some complex answers that i cant quite wrap my head around. Any Help would be much appreciated.

3
  • 2
    How can you make a boxplot for only 2 data points? Is your real data larger? If your data frame is called df1, then you can do: boxplot(DissolvedOxygen~Elevation, data=df1) Commented May 12 at 2:18
  • 1
    The data has 1000+ plus data points...but i was just giving a sample. My bad for not mentioning this. But yeah....that's pretty much the answer i was looking. Thanks. Commented May 12 at 2:24
  • ggplot() + geom_boxplot(data = df1, mapping = aes(River, DissolvedOxygen, fill = Elevation)) will work for you. Commented May 12 at 6:54

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.