Replicate: replicate

17-ReplicateR Documentation

replicate

Description

Replicates the given input number of times according to count/len , only one should be set at a time, and in case both values are given, only the len value will have effect.

Usage

## S4 method for signature 'Rcpp_MPCR'
rep(x,count=0,len=0)

Arguments

x

An MPCR object.

count

Value to determine how many times the input value will be replicated.

len

Value to determine the required output size, the input will be replicated until it matches the output len size.

Value

MPCR vector containing the replicated values.

Examples


    library(MPCR)
    x <- as.MPCR(1:16,4,4,"single")
    rep_vals_1 <- rep(x,count=2)  #output size will be 16*2
    rep_vals_2 <- rep(x,len=2)  #output size will be 2


MPCR documentation built on April 13, 2025, 5:08 p.m.

Related to Replicate in MPCR...