Skip to content

Commit

Permalink
Patch ojo_add_counts for condition length greater than 1 if statement (
Browse files Browse the repository at this point in the history
…#172)

* Patch ojo_add_counts for condition length greater than 1 if statement

* Bump patch version
  • Loading branch information
brancengregory authored May 30, 2024
1 parent 3d26395 commit 23d3e1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ojodb
Title: Analyze Data from the Open Justice Oklahoma Database
Version: 2.8.1
Version: 2.8.2
Authors@R: c(
person(
given = "Brancen",
Expand Down
2 changes: 1 addition & 1 deletion R/ojo_crim_cases.R
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ ojo_add_counts <- function(data, vars = NULL, ...) {
data <- data |>
dplyr::select(dplyr::all_of(columns), "count_as_filed", "disposition")
} else {
if (vars != "all") {
if (all(vars != "all")) {
selection <- c(dplyr::all_of(columns), dplyr::all_of(vars))
data <- data |>
dplyr::select(dplyr::all_of(selection))
Expand Down

0 comments on commit 23d3e1d

Please sign in to comment.