Skip to content

Commit

Permalink
chore: No native pipe yet
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Feb 23, 2025
1 parent da1b4bf commit de27f1a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions R/get-pkg.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,16 @@ get_package_help <- function(package_name) {
ignore.case = TRUE
)

res <- help_db$matches |>
dplyr::group_by(Name) |>
dplyr::summarize(
topic_id = dplyr::first(Name),
title = dplyr::first(Entry[Field == "Title"]),
aliases = list(I(Entry[Field == "alias"]))
) |>
dplyr::ungroup() |>
dplyr::select(topic_id, title, aliases)
res <- help_db$matches
res <- dplyr::group_by(res, Name)
res <- dplyr::summarize(
res,
topic_id = dplyr::first(Name),
title = dplyr::first(Entry[Field == "Title"]),
aliases = list(I(Entry[Field == "alias"]))
)
res <- dplyr::ungroup(res)
res <- dplyr::select(res, topic_id, title, aliases)

get_data_frame(res, format = "json", dims = c(Inf, Inf))
}
Expand Down

0 comments on commit de27f1a

Please sign in to comment.