Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drop_na = FALSE not working when shape = "flat"? #294

Open
ethanwhite opened this issue Sep 14, 2023 · 0 comments
Open

drop_na = FALSE not working when shape = "flat"? #294

ethanwhite opened this issue Sep 14, 2023 · 0 comments

Comments

@ethanwhite
Copy link
Member

rodents_crosstab = as_tibble(summarize_rodent_data(
  clean = TRUE,
  type = "Rodents",
  shape = "crosstab",
  time = "newmoon",
  output = "abundance",
  na_drop = FALSE,
  zero_drop = FALSE
))

rodents_flat = as_tibble(summarize_rodent_data(
  clean = TRUE,
  type = "Rodents",
  shape = "flat",
  time = "newmoon",
  output = "abundance",
  na_drop = FALSE,
  zero_drop = FALSE
))

rodents_crosstab |>
  select(newmoonnumber, PP) |>
  filter(newmoonnumber > 403) |>
  print(n = 20)
# A tibble: 163 × 2
   newmoonnumber    PP
           <int> <int>
 1           404     2
 2           405     7
 3           406    22
 4           407    22
 5           408    NA
 6           409    39
 7           410    NA
 8           411   104
 9           412    NA
10           413    36
# ℹ 153 more rows
# ℹ Use `print(n = ...)` to see more rows
rodents_flat |>
  filter(species == "PP") |>
  filter(newmoonnumber > 403) |>
  select(newmoonnumber, abundance) |>
  print(n = 20)
# A tibble: 122 × 2
   newmoonnumber abundance
           <int>     <int>
 1           404         2
 2           405         7
 3           406        22
 4           407        22
 5           409        39
 6           411       104
 7           413        36
 8           415         2
 9           416         0
10           417        12
# ℹ 112 more rows
# ℹ Use `print(n = ...)` to see more rows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant