Skip to content

Commit

Permalink
Hides reclass.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjmgarnier committed Jan 18, 2019
1 parent 97c59ba commit d6425d6
Show file tree
Hide file tree
Showing 7 changed files with 187 additions and 34 deletions.
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(print,trackTable)
S3method(reclass,default)
export(angAcc)
export(angSpeed)
export(arrange.trackTable)
Expand Down Expand Up @@ -35,7 +34,6 @@ export(nnd)
export(nsd)
export(pdist)
export(polOrder)
export(reclass)
export(rename.trackTable)
export(rotOrder)
export(sample_frac.trackTable)
Expand Down
35 changes: 16 additions & 19 deletions R/dplyr.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,11 @@
#' @param result The modified object, which is / might be missing the class/attributes.
#'
#' @return \code{result}, now with class/attributes restored.
#'
#' @export
reclass <- function(x, result) {
UseMethod('reclass')
.reclass <- function(x, result) {
UseMethod('.reclass')
}

#' @export
reclass.default <- function(x, result) {
.reclass.default <- function(x, result) {
class(result) <- unique(c(class(x)[[1]], class(result)))
attr(result, class(x)[[1]]) <- attr(x, class(x)[[1]])
result
Expand All @@ -42,64 +39,64 @@ reclass.default <- function(x, result) {
#' @rdname dplyr
#'
#' @export
select.trackTable <- function(.data, ...) reclass(.data, NextMethod())
select.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
rename.trackTable <- function(.data, ...) reclass(.data, NextMethod())
rename.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
filter.trackTable <- function(.data, ...) reclass(.data, NextMethod())
filter.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
arrange.trackTable <- function(.data, ...) reclass(.data, NextMethod())
arrange.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
mutate.trackTable <- function(.data, ...) reclass(.data, NextMethod())
mutate.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
transmute.trackTable <- function(.data, ...) reclass(.data, NextMethod())
transmute.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
summarise.trackTable <- function(.data, ...) reclass(.data, NextMethod())
summarise.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
summarize.trackTable <- function(.data, ...) reclass(.data, NextMethod())
summarize.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
group_by.trackTable <- function(.data, ...) reclass(.data, NextMethod())
group_by.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
ungroup.trackTable <- function(.data, ...) reclass(.data, NextMethod())
ungroup.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
sample_n.trackTable <- function(.data, ...) reclass(.data, NextMethod())
sample_n.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
sample_frac.trackTable <- function(.data, ...) reclass(.data, NextMethod())
sample_frac.trackTable <- function(.data, ...) .reclass(.data, NextMethod())

#' @rdname dplyr
#'
#' @export
do.trackTable <- function(.data, ...) reclass(.data, NextMethod())
do.trackTable <- function(.data, ...) .reclass(.data, NextMethod())
1 change: 0 additions & 1 deletion R/misc.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@

list(xC = tmp$center[1], yC = tmp$center[2], alpha = alpha, a = a, b = b)
}

3 changes: 0 additions & 3 deletions R/nn.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,3 @@ nnd <- function(x, y, geo = FALSE) {
}
})
}



162 changes: 162 additions & 0 deletions docs/reference/dot-reclass.html

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

12 changes: 6 additions & 6 deletions docs/reference/index.html

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

6 changes: 3 additions & 3 deletions man/reclass.Rd → man/dot-reclass.Rd

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

0 comments on commit d6425d6

Please sign in to comment.