units_x: Define units within 'pretty_axis'

View source: R/pretty_axis_support.R

units_xR Documentation

Define units within pretty_axis

Description

This function defines suitable default units (i.e., distances between sequential observations in a regular sequence) for a given input type (numbers or times).

Usage

units_x(iunits, x)

Arguments

iunits

A number or character. If NULL, the function defines suitable units based on the object class (see x and Value). Otherwise, the function returns iunits unchanged.

x

An object.

Value

If iunits is NULL, the function returns units = 5 for number inputs and units = "auto" for time inputs. Otherwise, the function returns iunits as inputted.

Author(s)

Edward Lavender


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