Skip to content

Commit

Permalink
Suppress testing of all examples that make internet calls
Browse files Browse the repository at this point in the history
  • Loading branch information
seancarmody committed Sep 20, 2022
1 parent 7000ab0 commit 27db4a2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ngramr
Type: Package
Title: Retrieve and Plot Google n-Gram Data
Version: 1.8.1
Version: 1.8.2
Date: 2022-09-10
Authors@R: c(
person("Sean", "Carmody", email = "[email protected]", role = c("aut", "cre", "cph"))
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# ngramr 1.8.2

* Suppress testing of all examples that make internet calls

# ngramr 1.8.1

* Handle offline state
Expand Down
7 changes: 4 additions & 3 deletions R/ggram.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#' Google will update these datasets as book scanning continues.
#'
#' @examples
#' library(ggplot2)
#'\donttest{ggram(c("hacker", "programmer"), year_start = 1950)
#' \donttest{library(ggplot2)
#' ggram(c("hacker", "programmer"), year_start = 1950)
#'
#' # Changing the geom.
#' ggram(c("cancer", "fumer", "cigarette"),
Expand Down Expand Up @@ -54,9 +54,10 @@
#' "((The United States are + The United States have) / The United States)")
#' ggram(p, year_start = 1800, google_theme = TRUE) +
#' theme(legend.direction="vertical")
#'}
#'
#' # Pass ngram data rather than phrases
#' ggram(hacker) + facet_wrap(~ Corpus)
#'}
#' @export

ggram <- function(phrases, ignore_case = FALSE, code_corpus = FALSE,
Expand Down
3 changes: 2 additions & 1 deletion R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
#' @export
#' @method print ngram
#' @examples
#' x <- ngram(c("hacker", "programmer"), year_start = 1950)
#' \donttest{x <- ngram(c("hacker", "programmer"), year_start = 1950)
#' print(x)
#' }

print.ngram <- function(x, rows=6, ...) {
df <- x
Expand Down
7 changes: 4 additions & 3 deletions man/ggram.Rd

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

3 changes: 2 additions & 1 deletion man/print.ngram.Rd

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

0 comments on commit 27db4a2

Please sign in to comment.