diff --git a/R/difference_join.R b/R/difference_join.R index cbdfc6b..bdb6d47 100644 --- a/R/difference_join.R +++ b/R/difference_join.R @@ -13,7 +13,7 @@ #' library(dplyr) #' #' head(iris) -#' sepal_lengths <- data_frame(Sepal.Length = c(5, 6, 7), Type = 1:3) +#' sepal_lengths <- tibble::tibble(Sepal.Length = c(5, 6, 7), Type = 1:3) #' #' iris %>% #' difference_inner_join(sepal_lengths, max_dist = .5) diff --git a/R/distance_join.R b/R/distance_join.R index 319abe9..1a6e079 100644 --- a/R/distance_join.R +++ b/R/distance_join.R @@ -21,7 +21,7 @@ #' library(dplyr) #' #' head(iris) -#' sepal_lengths <- data_frame(Sepal.Length = c(5, 6, 7), +#' sepal_lengths <- tibble::tibble(Sepal.Length = c(5, 6, 7), #' Sepal.Width = 1:3) #' #' iris %>% diff --git a/R/geo_join.R b/R/geo_join.R index e400026..948d5bd 100644 --- a/R/geo_join.R +++ b/R/geo_join.R @@ -36,9 +36,9 @@ #' #' # find pairs of US states whose centers are within #' # 200 miles of each other -#' states <- data_frame(state = state.name, -#' longitude = state.center$x, -#' latitude = state.center$y) +#' states <- tibble::tibble(state = state.name, +#' longitude = state.center$x, +#' latitude = state.center$y) #' #' s1 <- rename(states, state1 = state) #' s2 <- rename(states, state2 = state) diff --git a/R/regex_join.R b/R/regex_join.R index 0112dfa..3cafd89 100644 --- a/R/regex_join.R +++ b/R/regex_join.R @@ -18,10 +18,10 @@ #' library(ggplot2) #' data(diamonds) #' -#' diamonds <- tbl_df(diamonds) +#' diamonds <- tibble::as_tibble(diamonds) #' -#' d <- data_frame(regex_name = c("^Idea", "mium", "Good"), -#' type = 1:3) +#' d <- tibble::tibble(regex_name = c("^Idea", "mium", "Good"), +#' type = 1:3) #' #' # When they are inner_joined, only Good<->Good matches #' diamonds %>% diff --git a/R/stringdist_join.R b/R/stringdist_join.R index e01e675..a8c7e50 100644 --- a/R/stringdist_join.R +++ b/R/stringdist_join.R @@ -25,9 +25,9 @@ #' library(ggplot2) #' data(diamonds) #' -#' d <- data_frame(approximate_name = c("Idea", "Premiums", "Premioom", -#' "VeryGood", "VeryGood", "Faiir"), -#' type = 1:6) +#' d <- tibble::tibble(approximate_name = c("Idea", "Premiums", "Premioom", +#' "VeryGood", "VeryGood", "Faiir"), +#' type = 1:6) #' #' # no matches when they are inner-joined: #' diamonds %>% diff --git a/README.Rmd b/README.Rmd index 9dc3e71..18dcfef 100644 --- a/README.Rmd +++ b/README.Rmd @@ -77,7 +77,7 @@ misspellings # use the dictionary of words from the qdapDictionaries package, # which is based on the Nettalk corpus. library(qdapDictionaries) -words <- tbl_df(DICTIONARY) +words <- tibble::as_tibble(DICTIONARY) words ``` diff --git a/man/difference_join.Rd b/man/difference_join.Rd index 6ca5536..4cd7667 100644 --- a/man/difference_join.Rd +++ b/man/difference_join.Rd @@ -53,7 +53,7 @@ Join two tables based on absolute difference between their columns library(dplyr) head(iris) -sepal_lengths <- data_frame(Sepal.Length = c(5, 6, 7), Type = 1:3) +sepal_lengths <- tibble::tibble(Sepal.Length = c(5, 6, 7), Type = 1:3) iris \%>\% difference_inner_join(sepal_lengths, max_dist = .5) diff --git a/man/distance_join.Rd b/man/distance_join.Rd index b5cbbf5..c46329b 100644 --- a/man/distance_join.Rd +++ b/man/distance_join.Rd @@ -103,7 +103,7 @@ you are computing with longitude or latitude, you probably want to use library(dplyr) head(iris) -sepal_lengths <- data_frame(Sepal.Length = c(5, 6, 7), +sepal_lengths <- tibble::tibble(Sepal.Length = c(5, 6, 7), Sepal.Width = 1:3) iris \%>\% diff --git a/man/geo_join.Rd b/man/geo_join.Rd index 71b68a9..eba52cd 100644 --- a/man/geo_join.Rd +++ b/man/geo_join.Rd @@ -128,9 +128,9 @@ data("state") # find pairs of US states whose centers are within # 200 miles of each other -states <- data_frame(state = state.name, - longitude = state.center$x, - latitude = state.center$y) +states <- tibble::tibble(state = state.name, + longitude = state.center$x, + latitude = state.center$y) s1 <- rename(states, state1 = state) s2 <- rename(states, state2 = state) diff --git a/man/regex_join.Rd b/man/regex_join.Rd index 960e748..90ccca6 100644 --- a/man/regex_join.Rd +++ b/man/regex_join.Rd @@ -46,10 +46,10 @@ library(dplyr) library(ggplot2) data(diamonds) -diamonds <- tbl_df(diamonds) +diamonds <- tibble::as_tibble(diamonds) -d <- data_frame(regex_name = c("^Idea", "mium", "Good"), - type = 1:3) +d <- tibble::tibble(regex_name = c("^Idea", "mium", "Good"), + type = 1:3) # When they are inner_joined, only Good<->Good matches diamonds \%>\% diff --git a/man/stringdist_join.Rd b/man/stringdist_join.Rd index 059b2a7..c6cc8e2 100644 --- a/man/stringdist_join.Rd +++ b/man/stringdist_join.Rd @@ -71,9 +71,9 @@ library(dplyr) library(ggplot2) data(diamonds) -d <- data_frame(approximate_name = c("Idea", "Premiums", "Premioom", - "VeryGood", "VeryGood", "Faiir"), - type = 1:6) +d <- tibble::tibble(approximate_name = c("Idea", "Premiums", "Premioom", + "VeryGood", "VeryGood", "Faiir"), + type = 1:6) # no matches when they are inner-joined: diamonds \%>\% diff --git a/vignettes/stringdist_join.Rmd b/vignettes/stringdist_join.Rmd index ad0f7a2..9de5f70 100644 --- a/vignettes/stringdist_join.Rmd +++ b/vignettes/stringdist_join.Rmd @@ -30,7 +30,7 @@ misspellings # use the dictionary of words from the qdapDictionaries package, # which is based on the Nettalk corpus. library(qdapDictionaries) -words <- tbl_df(DICTIONARY) +words <- tibble::as_tibble(DICTIONARY) words ```