add rounding utilities
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
Gitea Organization/civilyticsR/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/utils.R
|
||||
\name{round_to_nearest_half}
|
||||
\alias{round_to_nearest_half}
|
||||
\title{Round values to the nearest 0.5}
|
||||
\usage{
|
||||
round_to_nearest_half(x)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{a numeric vector to round}
|
||||
}
|
||||
\value{
|
||||
a numeric vector with all elements rounded to 0, 0.5, or 1
|
||||
}
|
||||
\description{
|
||||
Round values to the nearest 0.5
|
||||
}
|
||||
\examples{
|
||||
round_to_nearest_half(0.9)
|
||||
round_to_nearest_half(0.7)
|
||||
round_to_nearest_half(0.4)
|
||||
}
|
||||
Reference in New Issue
Block a user