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
+20
View File
@@ -0,0 +1,20 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{rnh}
\alias{rnh}
\title{Round values to the nearest 0.5}
\usage{
rnh(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{
rnh(c(0.2, 0.3, 0.4, 0.8, 0.09, 0.9))
}