1
boxplot(s2040_W20_fishjump$Distance, main = "Fish Jump Distance", xlab = "Control vs Treatment", ylab = "Distance")

Returns me a single plot, with proper labels but only one boxplot. I need to divide the plots based on Control vs Treatment, and cannot figure out how.

Here is the data set I am working with

Here is the data set I am working with

Any help would be appreciated, thanks.

Sathish
  • 12,453
  • 3
  • 41
  • 59
Not Liam
  • 13
  • 2
  • 1
    No Images for data. Please post data in your question. Use this: `dput(s2040_W20_fishjump)` – Sathish Apr 07 '20 at 19:35
  • @Sathish you do not see the data? It is the big table. I am unsure what to use dput(s2040_W20_fishjump) for – Not Liam Apr 07 '20 at 19:41
  • Welcome to Stackoverflow. Please follow this, so it will help others to help you. https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – Sathish Apr 07 '20 at 19:43

1 Answers1

1

Use the tilda:

boxplot(s2040_W20_fishjump$Distance ~ s2040_W20_fishjump$Treatment, main = "Fish Jump Distance", xlab = "Control vs Treatment", ylab = "Distance")
David Ranzolin
  • 913
  • 1
  • 6
  • 18