If you rename your dataframe columns with a lookup for purposes of analysis.
lookup <- c(x = "X Column", y = "Y Column")
df <- df_raw %>% rename(all_of(lookup))
... pipeline code ...
How can I reverse the mapping to label the columns for my ggplot?
df %>%
ggplot(aes(x,y)) %>%
geom_line() %>%
## some_function(lookup) - maps x -> "X Column", y -> "Y Column"
My desired output is a plot with the x-axis labelled "X Column" and a y-axis labelled "Y Column".