interleave: Interleave

Description Usage Arguments Value Author(s) Examples

Description

These functions interleave the elements of several lists or several vectors or several matrix or several data frames.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  interleave(...)

  ## Default S3 method:
 interleave(...)

  ## S3 method for class 'matrix'
 interleave(..., byrow = TRUE)

  ## S3 method for class 'data.frame'
 interleave(..., byrow = TRUE,
    pretty.rownames = TRUE)

Arguments

...

lists, vectors, matrix or data.frames (but all the same classes).

byrow

for matrix and data.frames, interleaving will be done by rows (TRUE) or by columns (FALSE)

pretty.rownames

for data.frames, when byrow = TRUE, rownames of the output will use the name of the objects in ...

Value

This function returns an object of the same class of what's in ...

Author(s)

David Hajage dhajage@gmail.com

Examples

1
2
3
4
interleave(1:4, 5:15)
interleave(matrix(1:4, 2, 2), matrix(5:8, 2, 2))
interleave(matrix(1:4, 2, 2), matrix(5:8, 2, 2), byrow = FALSE)
interleave(head(esoph), tail(esoph))

eusebe/markup documentation built on May 16, 2019, 9:35 a.m.