R/pretty_axis_support.R
pretty_seq.Rd
This function defines a pretty sequence given data, limits and parameters.
pretty_seq(x, lim = NULL, pretty_args = list(n = 5))
x | An object representing some data to be plotted (e.g., x values). |
---|---|
lim | (optional) A vector of length two which define the limits within which the sequence should lie. |
pretty_args | A named list of arguments passed to pretty_x(). |
A list comprising 'at', a pretty sequence; and 'lim', limits, which may have been adjusted.
Edward Lavender
pretty_seq(0:10)#> $at #> [1] 0 2 4 6 8 10 #> #> $lim #> [1] 0 10 #> attr(,"user") #> [1] FALSE FALSE #>#> $at #> [1] 0 2 4 6 8 #> #> $lim #> [1] 0 9 #> attr(,"user") #> [1] TRUE TRUE #>#> $at #> [1] "2016-01-01" "2016-01-03" "2016-01-05" "2016-01-07" "2016-01-09" #> [6] "2016-01-11" "2016-01-13" #> #> $lim #> [1] "2016-01-01" "2016-01-13" #>#> $at #> [1] "2016-01-01" "2016-01-06" "2016-01-11" "2016-01-16" #> #> $lim #> [1] "2016-01-01" "2016-01-16" #>