Learn R Programming

bsTools (version 0.1.0)

listExtract: Extract the values from each entry in a list of vectors at a specific index

Description

Extract the values from each entry in a list of vectors at a specific index

Usage

listExtract(x, pos)

Arguments

x

A list, each item of the list should have equal length.

pos

A integer, the position to extract from each entry in the list.

Value

A list.

Examples

Run this code
# NOT RUN {
listExtract(list(col1 = c(1, 2, 3, 4, 5), col2 = c("a", "b", "c", "d", "e")), 3)
# }

Run the code above in your browser using DataLab