Skip to content

cran/sgmean

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sgmean

sgmean computes the trimmed mean using a proportional discount method on the extremes, replicating the behavior of Statgraphics software.

Unlike R’s built-in mean(..., trim), which removes boundary values entirely, sgmean applies a weighted reduction — producing results consistent with Statgraphics.

Installation

You can install sgmean from GitHub with:

# install.packages("devtools")
devtools::install_github("jcarlosgaviria/sgmean")

Usage

library(sgmean)

x <- c(2, 4, 6, 8, 100)

# sgmean method (Statgraphics compatible)
sgmean(x, trim = 0.05)

# Base R method (different result)
mean(x, trim = 0.05)

Author

Juan Carlos Gaviria Chaverra

About

❗ This is a read-only mirror of the CRAN R package repository. sgmean — Trimmed Mean Compatible with 'Statgraphics' Method. Homepage: https://github.com/jcarlosgaviria/sgmean Report bugs for this package: https://github.com/jcarlosgaviria/sgmean/issues

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages