inst/doc/plots.R

## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

## ----setup--------------------------------------------------------------------
library(whereami)
library(ggplot2)

## ----rmd caption,fig.cap=whereami(path_expand = TRUE),fig.width=7-------------

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


## ----ggcaption,fig.width=7----------------------------------------------------

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

Try the whereami package in your browser

Any scripts or data that you put into this service are public.

whereami documentation built on Dec. 28, 2022, 2:40 a.m.