Type: Package
Title: Trimmed-k Mean Estimator
Version: 1.0.0
Date: 2025-11-08
Description: Computes the trimmed-k mean by removing the k smallest and k largest values from a numeric vector. Created for STAT 5400 at the University of Iowa.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.3
Suggests: knitr, rmarkdown
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-11-11 03:41:42 UTC; shouhardyo
Author: Shouhardyo Sarkar [aut, cre]
Maintainer: Shouhardyo Sarkar <shouhardyo-sarkar@uiowa.edu>
Repository: CRAN
Date/Publication: 2025-11-13 21:10:10 UTC

Compute Trimmed-k Mean

Description

This function calculates the trimmed-k mean of a numeric vector by removing the k smallest and k largest values.

Usage

kTrimMean(dat, k)

Arguments

dat

A numeric vector of data.

k

An integer indicating how many smallest and largest values to trim.

Value

The trimmed-k mean of the data. Returns NA if not enough data points.

Examples

set.seed(5400)
dat <- rexp(20, rate = 0.5)
kTrimMean(dat, k = 2)