knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(whereami)
library(ggplot2)

Rmarkdown Caption

ggplot(iris) + 
  aes(x=Sepal.Length,y=Sepal.Width) + 
  geom_point()

ggplot2 Caption

ggplot(iris) + 
  aes(x=Sepal.Length,y=Sepal.Width) + 
  geom_point() + 
  labs(caption = sprintf('sourced from: %s',whereami(path_expand = TRUE)))


yonicd/whereami documentation built on Jan. 9, 2023, 9:59 a.m.