Skip to content

Instantly share code, notes, and snippets.

@amoeba
Created March 8, 2017 20:59
Show Gist options
  • Select an option

  • Save amoeba/15a510bccbea671fcc1baf0da8ba2202 to your computer and use it in GitHub Desktop.

Select an option

Save amoeba/15a510bccbea671fcc1baf0da8ba2202 to your computer and use it in GitHub Desktop.
> df <- as.tbl(data.frame(x = c("a", "b", "c")))
> df
# A tibble: 3 × 1
x
<fctr>
1 a
2 b
3 c
> df %>% filter(x == "a")
# A tibble: 1 × 1
x
<fctr>
1 a
> df %>% filter(x != "a")
# A tibble: 2 × 1
x
<fctr>
1 b
2 c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment