moround: Round numbers to the ceiling of a given base

View source: R/addons.R

moroundR Documentation

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

x

numeric vector

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(s)

Małgorzata Oleś <malgorzata.oles@embl.de>

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))

MalgorzataOles/BloodCancerMultiOmics2017 documentation built on March 29, 2024, 2:29 p.m.