Closed Mckenziematt closed 5 years ago
You might need to create a subset first. For example, I used the following script to isolate only the Acer rubrum data.
ACE<-subset(trees, species == 'Acer rubrum', select =c(species:beers)) ACE
With the subset you should be able to work with only what you want. Hope this helps.
Did that answer your question? If so please close the issue. Thanks!
On Feb 4, 2019, at 4:05 PM, jensenac notifications@github.com wrote:
You might need to create a subset first. For example, I used the following script to isolate only the Acer rubrum data.
ACE<-subset(trees, species == 'Acer rubrum', select =c(species:beers)) ACE
With the subset you should be able to work with only what you want. Hope this helps.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
One thing I forgot to note is that remember that boxplots are best when you are comparing a continuous variable (like cover) to a categorical variable. The only categorical explanatory variable in the trees dataset is disturb
so to make a boxplot for that variable would look something like this:
acer <- subset(trees, species == "Acer rubrum")
boxplot(cover ~ disturb, data = acer)
Hi there,
This may be a super simple question but I'm struggling here. I am trying to perform box plots on the acer and abies data for the "cover" variable. When I use this code it gives me the cover data for all species in the tree data set. How do I tell R to specifically give me the cover data for just abies and acer and perform a box plot. boxplot(cover ~ species, data = tree, xlab='species', ylab = 'cover')