repRow: Repeat a vector by row

Description Usage Arguments Author(s) See Also Examples

View source: R/repRow.r

Description

Repeat a vector by row

Usage

1
repRow(x, n)

Arguments

x

vector or matrix

n

number of replication

Author(s)

TszKin Julian Chan [email protected]

See Also

repCol

Examples

1
2
repRow(c(a=1,b=2,c=3),5)
repCol(c(a=1,b=2,c=3),5)

Example output

     a b c
[1,] 1 2 3
[2,] 1 2 3
[3,] 1 2 3
[4,] 1 2 3
[5,] 1 2 3
  [,1] [,2] [,3] [,4] [,5]
a    1    1    1    1    1
b    2    2    2    2    2
c    3    3    3    3    3

Jmisc documentation built on May 30, 2017, 6:21 a.m.

Related to repRow in Jmisc...