Skip to content

Commit

Permalink
Once again, override lag
Browse files Browse the repository at this point in the history
  • Loading branch information
hadley committed May 21, 2015
1 parent 3a19c63 commit f8a46e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ S3method(inner_join,tbl_sql)
S3method(intersect,data.frame)
S3method(intersect,default)
S3method(intersect,tbl_sql)
S3method(lag,default)
S3method(left_join,data.frame)
S3method(left_join,data.table)
S3method(left_join,tbl_df)
Expand Down Expand Up @@ -380,6 +379,7 @@ export(is.sql)
export(is.src)
export(is.tbl)
export(knit_print.trunc_mat)
export(lag)
export(lahman_df)
export(lahman_dt)
export(lahman_mysql)
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# dplyr 0.4.1.9000

* `lag()` once again overrides `lag()` instead of just the default method
`lag.default()`. This is necesary due to changes in R CMD check. To use
the lag function provided by another package, use `pkg::lag`.

* Lists-cols that contain data frames now print a slightly nicer summary
(#1147)

Expand Down
2 changes: 1 addition & 1 deletion R/lead-lag.R
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ lead <- function(x, n = 1L, default = NA, order_by = NULL, ...) {

#' @export
#' @rdname lead-lag
lag.default <- function(x, n = 1L, default = NA, order_by = NULL, ...) {
lag <- function(x, n = 1L, default = NA, order_by = NULL, ...) {
if (!is.null(order_by)) {
return(with_order(order_by, lag, x, n = n, default = default))
}
Expand Down
4 changes: 2 additions & 2 deletions man/lead-lag.Rd
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/lead-lag.R
\name{lead-lag}
\alias{lag.default}
\alias{lag}
\alias{lead}
\alias{lead-lag}
\title{Lead and lag.}
\usage{
lead(x, n = 1L, default = NA, order_by = NULL, ...)

\method{lag}{default}(x, n = 1L, default = NA, order_by = NULL, ...)
lag(x, n = 1L, default = NA, order_by = NULL, ...)
}
\arguments{
\item{x}{a vector of values}
Expand Down

0 comments on commit f8a46e0

Please sign in to comment.