Skip to content

Commit

Permalink
export trim.sample
Browse files Browse the repository at this point in the history
  • Loading branch information
jarbet committed Sep 17, 2024
1 parent 1769f04 commit e9185d6
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

export(detect.outliers)
export(identify.bic.optimal.data.distribution)
export(trim.sample)
4 changes: 1 addition & 3 deletions R/trim.sample.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
#' @param x A numeric vector.
#' @param trim A number, the fraction of observations to be trimmed from each end of `x`.
#' @return A sorted, trimmed copy of `x`.
#'
#' @export trim.sample
#' @examples
#' trim.sample(
#' x = 1:20,
#' trim = 0.05
#' );
#'
#' @noRd
trim.sample <- function(x, trim = 0.05) {
x <- sort(x);
if (length(x) <= 10) {
Expand Down
28 changes: 28 additions & 0 deletions man/trim.sample.Rd

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

0 comments on commit e9185d6

Please sign in to comment.