Skip to content

Commit

Permalink
lintr, update NEWS
Browse files Browse the repository at this point in the history
  • Loading branch information
elbersb committed Aug 7, 2019
1 parent 6755d4e commit 3a6443f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Authors@R: person("Benjamin", "Elbers", email = "[email protected]",
Description: Provides feedback about 'dplyr' and 'tidyr' operations.
License: MIT + file LICENSE
Imports: dplyr, tidyr, glue, clisymbols
Suggests: testthat, covr, lintr, nycflights13
Suggests: testthat, covr, lintr
Encoding: UTF-8
LazyData: true
URL: https://github.com/elbersb/tidylog/
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# 0.1.0.9000
- added detailed merge information for joins (#25)
- added supoort for tidyr functions: gather, spread (thanks @WilDoane), drop_na (@jackhannah95), fill and replace_na
- use clisymbols for ellipsis
- add number of remaining rows to filter (#23)
Expand Down
14 changes: 8 additions & 6 deletions R/join.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
#' @return see \link[dplyr:join]{inner_join}
#' @examples
#' left_join(dplyr::band_members, dplyr::band_instruments, by = "name")
#' #> left_join: added 0 rows and added one column (plays)
#' full_join(dplyr::band_members, dplyr::band_instruments, by = "name")
#' #> full_join: added one row and added one column (plays)
#' #> left_join: added one column (plays)
#' #> > rows only in x 1
#' #> > rows only in y (1)
#' #> > matched rows 2
#' #> > ===
#' #> > rows total 3
#' @import dplyr
#' @export
inner_join <- function(x, y, by = NULL, ...) {
Expand Down Expand Up @@ -68,9 +71,9 @@ log_join <- function(x, y, by, .fun, .funname, ...) {
cols_x <- x[, keys$x, drop = FALSE]
cols_y <- y[, keys$y, drop = FALSE]

only_in_x = suppressMessages(dplyr::anti_join(cols_x, cols_y,
only_in_x <- suppressMessages(dplyr::anti_join(cols_x, cols_y,
by = stats::setNames(keys$y, keys$x)))
only_in_y = suppressMessages(dplyr::anti_join(cols_y, cols_x,
only_in_y <- suppressMessages(dplyr::anti_join(cols_y, cols_x,
by = stats::setNames(keys$x, keys$y)))

stats <- list(
Expand Down Expand Up @@ -136,4 +139,3 @@ log_join <- function(x, y, by, .fun, .funname, ...) {

newdata
}

9 changes: 6 additions & 3 deletions man/inner_join.Rd

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

0 comments on commit 3a6443f

Please sign in to comment.