add rounding utilities
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit

This commit is contained in:
2024-09-19 14:32:43 -04:00
parent f4a4ee85a7
commit 962f8ea6b7
7 changed files with 167 additions and 29 deletions
+24
View File
@@ -0,0 +1,24 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{trim_max}
\alias{trim_max}
\title{Take the maximum of a number after trimming values}
\usage{
trim_max(vec, n)
}
\arguments{
\item{vec}{a numeric vector}
\item{n}{integer, the number of maximum values to trim before taking the maximum}
}
\value{
the highest value after removing the highest n values
}
\description{
Take the maximum of a number after trimming values
}
\examples{
trim_max(c(10, 10, 10, 9, 8, 7), n = 2)
trim_max(c(10, 10, 10, 9, 8, 7), n = 3)
trim_max(c(10, 10, 10, 9, 8, 7), n = 4)
}