Skip to content

Commit 0bfbcc3

Browse files
committed
move helper to location where it is used
1 parent 20fa50f commit 0bfbcc3

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

R/stat-summary.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ summarise_by_x <- function(data, summary, ...) {
218218
merge(summary, unique, by = c("x", "group"), sort = FALSE)
219219
}
220220

221+
# Return unique columns
222+
# This is used for figuring out which columns are constant within a group
223+
#
224+
# @keyword internal
225+
uniquecols <- function(df) {
226+
df <- df[1, sapply(df, is_unique), drop = FALSE]
227+
rownames(df) <- seq_len(nrow(df))
228+
df
229+
}
230+
221231
#' A selection of summary functions from Hmisc
222232
#'
223233
#' @description

R/utilities.R

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,6 @@ clist <- function(l) {
8484
paste(paste(names(l), l, sep = " = ", collapse = ", "), sep = "")
8585
}
8686

87-
# Return unique columns
88-
# This is used for figuring out which columns are constant within a group
89-
#
90-
# @keyword internal
91-
uniquecols <- function(df) {
92-
df <- df[1, sapply(df, is_unique), drop = FALSE]
93-
rownames(df) <- seq_len(nrow(df))
94-
df
95-
}
96-
9787
#' Convenience function to remove missing values from a data.frame
9888
#'
9989
#' Remove all non-complete rows, with a warning if `na.rm = FALSE`.

0 commit comments

Comments
 (0)