head_list: A custom head() function

Description Usage Arguments Details Value

View source: R/head_list.R

Description

Sane head_list() from https://gist.github.com/pimentel/256fc8c9b5191da63819

Usage

1
head_list(obj, n = 6L, ...)

Arguments

obj

a list object

n

a single integer. If positive, prints the first n items for the list and all entries in the list. If negative, prints all but the last n items in the list.

Details

Return the first or last part of a list

Returns the first or last part of a list. Instead of returning the first n entries as the standard head() does, it attempts to call head() recursively on the entries in the list. If it fails, it will return the particular entry (standard behavior).

Value

a list of length n, with items in the list of length n


slackline/nmisc documentation built on May 30, 2019, 3:04 a.m.