Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayhesselberth/d4e9d85634717234665b6d4d1623fb96 to your computer and use it in GitHub Desktop.
Save jayhesselberth/d4e9d85634717234665b6d4d1623fb96 to your computer and use it in GitHub Desktop.
``` r
library(nihexporter)
#> Loading required package: jsonlite
#> Loading required package: httr
#> Loading required package: dplyr
#>
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#>
#> filter, lag
#> The following objects are masked from 'package:base':
#>
#> intersect, setdiff, setequal, union
library(tidyverse)
projects %>%
filter(activity == "F31") %>%
count(institute, activity, fiscal.year) %>%
ggplot(aes(x = fiscal.year, y = n)) +
geom_point() + geom_line() +
facet_wrap(~ institute) +
labs(
title = "F31 grant funding by institute"
)
#> geom_path: Each group consists of only one observation. Do you need to
#> adjust the group aesthetic?
```
![](https://i.imgur.com/cKRP46n.png)
Created on 2018-07-30 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0).
@jayhesselberth
Copy link
Author

library(nihexporter)
#> Loading required package: jsonlite
#> Loading required package: httr
#> Loading required package: dplyr
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(tidyverse)

projects %>%
  filter(activity == "F31") %>%
  count(institute, activity, fiscal.year) %>%
  ggplot(aes(x = fiscal.year, y = n)) +
    geom_point() + geom_line() +
    facet_wrap(~ institute) + 
    labs(
      title = "F31 grant funding by institute"
    )
#> geom_path: Each group consists of only one observation. Do you need to
#> adjust the group aesthetic?

Created on 2018-07-30 by the reprex package (v0.2.0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment