rep {base} R Documentation

Replicate Elements of Vectors and Lists

Description


rep replicates the values in x. It is a generic function,
and the (internal) default method is described here.

Usage

rep(x, times);

Arguments

x

a vector (of any mode including a list) or a factor or (for rep only) a POSIXct or POSIXlt or Date object; or an S4 object containing such an object.

times

an integer-valued vector giving the (non-negative) number of times to repeat each element if of length length(x), or to repeat the whole vector if of length 1. Negative or NA values are an error. A double vector is accepted, other inputs being coerced to an integer or double vector. [as integer]

Details

Authors

SMRUCC genomics Institute

Value

this function returns data object of type any kind.

clr value class

Examples


[Package base version 2.33.856.6961 Index]