-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #77
- Loading branch information
Showing
4 changed files
with
155 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# nocov begin | ||
|
||
warn_data_frame_method <- function() { | ||
warn(strwrap(paste0( | ||
"You are using a dplyr method on a raw data.table, which will call the ", | ||
"data frame implementation, and is likely to be inefficient. \n\n", | ||
"To suppress this message, either generate a data.table translation ", | ||
"with `lazy_dt()` or convert to a data frame or tibble with ", " | ||
`as.data.frame()`/`as_tibble()`." | ||
))) | ||
} | ||
|
||
# Single table ------------------------------------------------------------ | ||
|
||
#' @export | ||
distinct.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
do.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
# exported onLoad | ||
filter.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
group_by.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
mutate.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
rename.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
sample_frac.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
sample_n.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
summarise.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
select.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
slice.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
summarise.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
|
||
#' @export | ||
transmute.data.table <- function(.data, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
|
||
# Two-table --------------------------------------------------------------- | ||
|
||
#' @export | ||
left_join.data.table <- function(x, y, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
right_join.data.table <- function(x, y, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
inner_join.data.table <- function(x, y, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
full_join.data.table <- function(x, y, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
semi_join.data.table <- function(x, y, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
#' @export | ||
anti_join.data.table <- function(x, y, ...) { | ||
warn_data_frame_method() | ||
NextMethod() | ||
} | ||
|
||
# nocov end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters