[226bc8]: / man / moround.Rd

Download this file

32 lines (31 with data), 661 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
\name{moround}
\alias{moround}
\title{
Round numbers to the ceiling of a given base
}
\description{
The function rounds the value up (either numeric or a numeric vector) to the
multiplication of the specified base.
}
\usage{
moround(x,base)
}
\arguments{
\item{x}{numeric vector}
\item{base}{numeric vector}
}
\details{
Both arguments could be either single numeric or numeric vectors.
Base argument should be either of length 1 or the divisible of the length of
argument x.
}
\value{
numeric vector
}
\author{
Małgorzata Oleś <dr.malgorzata.oles@gmail.com>
}
\examples{
moround(x=c(1.23, 5, 5.1, 8), base=5)
moround(x=c(1.23, 5, 5.1, 8), base=c(2, 5))
}