“R” You Ready Kids?

Aye, aye Captain!
Today was the big kickoff day for diving straight into our data! But before we booted up our laptops and opened our RStudio apps, our group had a discussion to clarify the missing pitfall and stickies. One hypothesis was that someone might have copied and pasted from another xcel sheet on their computer.

9 out of 16 missing samples can be retrieved. If we can’t find them, we might have to throw that data away. Louie mentioned how important preserving the data was. Just like his 96 well plate story, a couple of clicks on xcel can wipe out weeks and countless hours of data.

There were also a couple of discrepancies on the plant measurement data. When some of the plants were chewed down by mammals(?), some counted that as N/A and some put it at the value of 0. I recall that it was hard to count herbivory when the plant was dry and crispy. But, some data is better than no data and maybe we could add makers to the data that we are less confident in.

We thought it was a good idea to compare cohort data, which led us to start importing our CSV files! John has uploaded some sample R scripts on the drive to familiarize ourselves (Thank you John!). We wanted to create joint histograms of plant height and leaf herbivory.

Screen Shot 2017-05-25 at 10.24.56 PM.png

This is a sample of some of the script that we wrote.

Each person in the class created their own data analysis folder in the “Project Analysis Folder” We learned a couple more lessons in R that include: value matching, print, and adding trt. R works entirely in vectors and our columns are the vectors. At this point, we’re still exploring our data and making bar plots. Our actual analysis will be done Tuesday.

We also talked about GG plots and how it is a powerful tool to use for data analysis. Louie taught us that taking a step-back when you look at the possible statistical methods you can use for your data is one of the most important and crucial parts of research. It is easy to rush to find the answers to your original questions, but your visual graphs and plots should be presented in a way that best suits your data.

t9TVZ.png

Random example of a GG plot

When writing script, it is always good to start with a rm(list) and graphics line to clear all the variables. To learn more about GG plots, type in “docs.ggplot.org” to learn some important functions.

 

Things To Do

  1. Think about the questions that seem the most interesting to you. You will be building a script to your analysis.
  2. Start your manuscript. The rough draft will be due June 1st (next Thursday) and will include your into, methods, and R markdown report with the accompanied scripted plots.

Agenda for Next Tuesday (May 30th)

  • 1:40-2:00 – Debrief about the missing samples and talk about the clean data sets we can use.
  • 2:00-4:00 – Work on our R markdown report and plots.
  • 4:00-4:30 – Further Discussion about our manuscript.

    *Also special shoutout to Kyle & Marshall for bringing us sweet treats to lab! They were both delicious and it made my day! Thank you!

    It’s kind of amazing to think we’ve spent nearly 20 weeks with each other as a research group. I’m surprised we didn’t rip each other’s hair out (kidding). We currently have so much data it’s going to be interesting to parse out the specifics and decide what interesting ecological questions we can answer. Because this is my last blog post, I want to thank everyone for all the extra miles people went through. Whether it be spending extra hours in lab counting pitfalls or biking in 95 degree weather to field sites to move solar panels. I’ve learned a lot through group dynamics and future collaborations don’t seem as daunting anymore. You guys are a great group and I wish you all good luck on future endeavors!

Sincerely,

Ashley Kim

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s