Learn R Programming

SwimmeR (version 0.14.2)

fold: Fold a vector onto itself

Description

Fold a vector onto itself

Usage

fold(x, block.size = 1)

Value

a new vector in the following order: first block, last block, second block, second-to-last block, ...

Arguments

x

a vector

block.size

the size of groups in which to block the data

References

from the seemingly now defunct mRchmadness package by Eli Shayer and Saber Powers and used per the terms of that package's GPL-2 license