Skip to content

Commit

Permalink
Merge pull request #150 from ropensci/rjournal-review
Browse files Browse the repository at this point in the history
remove dplyr in example
  • Loading branch information
massimoaria authored Aug 23, 2023
2 parents 694cb87 + caea77c commit a01718b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions R/oa_ngrams.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ ngram2df <- function(ngram) {
#'
#' ngrams_data <- oa_ngrams(c("W1963991285", "W1964141474"))
#'
#' library(dplyr)
#' # 10 most common ngrams in the first work
#' first_paper_ngrams <- ngrams_data$ngrams[[1]]
#' top_10_ngrams <- first_paper_ngrams %>%
#' slice_max(ngram_count, n = 10, with_ties = FALSE)
#' first_paper_ngrams[
#' order(first_paper_ngrams$ngram_count, decreasing = TRUE),
#' ][
#' 1:10,
#' ]
#'
#' # Missing N-grams are `NULL` in the `ngrams` list-column
#' oa_ngrams("https://openalex.org/W2284876136")
Expand Down
9 changes: 6 additions & 3 deletions man/oa_ngrams.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a01718b

Please sign in to comment.