list.prepend: Prepend elements to a list

Description Usage Arguments See Also Examples

View source: R/list.insert.R

Description

Prepend elements to a list

Usage

1
list.prepend(.data, ...)

Arguments

.data

A list or vector

...

The vector or list to prepend before x

See Also

list.append, list.insert

Examples

1
2
3
x <- list(a=1,b=2,c=3)
list.prepend(x, d=4, e=5)
list.prepend(x, d=4, f=c(2,3))

Example output

$d
[1] 4

$e
[1] 5

$a
[1] 1

$b
[1] 2

$c
[1] 3

$d
[1] 4

$f
[1] 2 3

$a
[1] 1

$b
[1] 2

$c
[1] 3

rlist documentation built on Sept. 5, 2021, 5:30 p.m.