Skip to content

Commit

Permalink
refactor: lint 1 script
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Oct 12, 2023
1 parent 90fd68e commit 4bd41dc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions R/spq_arrange.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
#' spq_arrange(desc(length), item_label) %>%
#' spq_head(50)
#'
#' # descending length, ascending item_label, "R" syntax with quotes e.g. for a loop
#' # descending length, ascending item_label,
#' # "R" syntax with quotes e.g. for a loop
#' variable = "length"
#' spq_init() %>%
#' spq_add("?item wdt:P31/wdt:P279* wd:Q4022") %>%
Expand Down Expand Up @@ -90,8 +91,10 @@ spq_arrange = function(.query, ..., .replace = FALSE) {

# track ordering in structure df ----
if (!is.null(.query[["vars"]])) {
ordering_variables = purrr::map_df(ordering_patterns, handle_arrange_pattern) %>%
dplyr::filter(name %in%.query[["vars"]][["name"]])
ordering_variables = purrr::map_df(
ordering_patterns, handle_arrange_pattern
) %>%
dplyr::filter(name %in% .query[["vars"]][["name"]])
} else {
# in tests
ordering_variables = purrr::map_df(ordering_patterns, handle_arrange_pattern)
Expand Down

0 comments on commit 4bd41dc

Please sign in to comment.