fill: Fills a vector with a specified 'fill' value

Description Usage Arguments Value Examples

View source: R/accessory_funcs.R

Description

Fills a vector with a specified fill value

Usage

1
fill(x, fill = NA)

Arguments

x

vector; A vector in which to fill the NA values

fill

basic data type; Any value from one of R's basic data types (character, numeric, integer, logical, complex)

Value

vector; Same values as input vector, but NA values are replaced with fill if above of below the threshold, or 'rep.na' if NA

Examples

1
2
vals <- c(0,0.25,0.5,0.75,1,NA)
fill(vals, fill=2)

CompEpigen/scMethrix documentation built on Nov. 6, 2021, 3:09 p.m.