Skip to contents

This function retrieves the nth element of a given list.

Usage

get_list_item(list_object, n)

Arguments

list_object

A list.

n

The index of the element to retrieve.

Value

The nth element of the input list.

Examples

my_list <- list(a = 1, b = 2, c = 3)
get_list_item(my_list, 2)
#> [1] 2