tickr | R Documentation |
Adjust axis tick marks and labels
tickr(
data,
var,
by = 5,
var_min = NULL,
var_max = NULL,
lab_start = NULL,
lab_end = NULL
)
data |
A dataframe containing the variable of interest |
var |
Variable of interest (e.g., year) |
by |
Step increase desired (e.g., every 5 years) |
var_min |
minimum value to adjust axis range |
var_max |
Maximum value to adjust axis range |
lab_start |
Lowest value to label |
lab_end |
Last value to label |
A dataframe containing:
breaks |
Numeric vector of axis break positions |
labels |
Character vector of axis labels |
# Create sample data
df <- data.frame(year = 1977:2023, value = rnorm(47))
# Basic usage
tickr(data=df, var=year, by=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.