seq_extend: Extend a regular sequence within limits

View source: R/pretty_axis_support.R

seq_extendR Documentation

Extend a regular sequence within limits

Description

This function extends a regular sequence in both directions towards user-defined limits.

Usage

seq_extend(x, lim)

Arguments

x

A sequence.

lim

A vector of two which specify the lower and upper limits.

Value

The function returns a sequence.

Author(s)

Edward Lavender

Examples

# extend_seq(2:4, c(0, 10))
# extend_seq(2:4, c(0, 4))
# x <- seq.Date(as.Date("2016-01-01"), as.Date("2016-01-10"), 1)
# extend_seq(x, as.Date(c("2015-12-10", "2016-01-20")))

edwardlavender/prettyGraphics documentation built on Jan. 19, 2025, 2:47 p.m.