Skip to content

Commit

Permalink
library(tibble)
Browse files Browse the repository at this point in the history
  • Loading branch information
moodymudskipper committed Jan 13, 2022
1 parent c077154 commit f48a3c8
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 40 deletions.
20 changes: 10 additions & 10 deletions R/generics_and_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
#' @export
#' @examples
#' # See README for a more verbose version
#'
#' male_penguins <- tibble::tribble(
#' library(tibble)
#' male_penguins <- tribble(
#' ~name, ~species, ~island, ~flipper_length_mm, ~body_mass_g,
#' "Giordan", "Gentoo", "Biscoe", 222L, 5250L,
#' "Lynden", "Adelie", "Torgersen", 190L, 3900L,
#' "Reiner", "Adelie", "Dream", 185L, 3650L
#' )
#'
#' female_penguins <- tibble::tribble(
#' female_penguins <- tribble(
#' ~name, ~species, ~island, ~flipper_length_mm, ~body_mass_g,
#' "Alonda", "Gentoo", "Biscoe", 211, 4500L,
#' "Ola", "Adelie", "Dream", 190, 3600L,
Expand All @@ -50,8 +50,8 @@
#' check = check_specs(implicit_keys = "ignore", duplicate_keys_right = "inform")
#' )
#'
#' df1 <- tibble::tibble(id = 1:3, value = c(10, NA, 30))
#' df2 <- tibble::tibble(id = 2:4, value = c(22, 32, 42))
#' df1 <- tibble(id = 1:3, value = c(10, NA, 30))
#' df2 <- tibble(id = 2:4, value = c(22, 32, 42))
#'
#' # handle conflicted columns when joining
#' power_left_join(df1, df2, by = "id", conflict = `+`)
Expand Down Expand Up @@ -122,15 +122,15 @@
#' )
#'
#' # fill unmatched values
#' df1 <- tibble::tibble(id = 1:3)
#' df2 <- tibble::tibble(id = 1:2, value2 = c(2, NA), value3 = c(NA, 3))
#' df1 <- tibble(id = 1:3)
#' df2 <- tibble(id = 1:2, value2 = c(2, NA), value3 = c(NA, 3))
#' power_left_join(df1, df2, by = "id", fill = 0)
#' power_left_join(df1, df2, by = "id", fill = list(value2 = 0))
#'
#' # join recursively
#' df1 <- tibble::tibble(id = 1, a = "foo")
#' df2 <- tibble::tibble(id = 1, b = "bar")
#' df3 <- tibble::tibble(id = 1, c = "baz")
#' df1 <- tibble(id = 1, a = "foo")
#' df2 <- tibble(id = 1, b = "bar")
#' df3 <- tibble(id = 1, c = "baz")
#' power_left_join(list(df1, df2, df3), by = "id")
#' power_left_join(df1, list(df2, df3), by = "id")
#'
Expand Down
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandoc: 2.14.0.3
pkgdown: 2.0.1
pkgdown_sha: ~
articles: {}
last_built: 2022-01-12T22:43Z
last_built: 2022-01-13T00:26Z

Loading

0 comments on commit f48a3c8

Please sign in to comment.