safe_tail: Safely retrieve the last N values from an object

Description Usage Arguments

View source: R/manipulate.R

Description

Using utils::tail to get the last sequential values in an object relies on that object being ordered, which it sometimes isn't due to backfilling. safe_tail retrieves the last N values in a "safe" way, taking the possibility of unordered data into account.

Usage

1
safe_tail(x, n, silent = TRUE)

Arguments

x

an object to tail

n

the number of values to take

silent

whether to produce warnings and messages or not. TRUE by default.


wikimedia/wikimedia-discovery-polloi documentation built on Dec. 4, 2019, 2:12 p.m.