| 17-Replicate | R Documentation |
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.
## S4 method for signature 'Rcpp_MPCR'
rep(x,count=0,len=0)
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. |
MPCR vector containing the replicated values.
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.