Skip to content

Instantly share code, notes, and snippets.

@karthik
Created March 4, 2016 21:41
Show Gist options
  • Select an option

  • Save karthik/95b75a88ae7de2378afd to your computer and use it in GitHub Desktop.

Select an option

Save karthik/95b75a88ae7de2378afd to your computer and use it in GitHub Desktop.
---
title: "Paper"
author: "Karthik Ram"
date: "March 4, 2016"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
```{r}
library(dplyr)
library(ggplot2)
```
```{r}
surveys <- read.csv('data/portal_data_joined.csv')
```
Create a complete_surveys data frame
```{r}
surveys_complete <- surveys %>%
dplyr::filter(species_id != "") %>%
dplyr::filter(!is.na(weight)) %>%
dplyr::filter(!is.na(hindfoot_length))
```
Plot with facets
```{r}
ggplot(data = surveys_complete, aes(x = species_id, y= weight)) + geom_jitter(alpha = 0.3, color = "tomato") + geom_boxplot()
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment