Skip to content

❗ This is a read-only mirror of the CRAN R package repository. whereami — Reliably Return the Source and Call Location of a Command. Homepage: https://github.com/yonicd/whereami Report bugs for this package: https://github.com/yonicd/whereami/issues

License

cran/whereami

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CRAN_Status_Badge Coverage status Covrpage Summary

whereami

The goal of whereami is to reliably find where command is run from.

Installation

remotes::install_github("yonicd/whereami")

Example

library(whereami)
library(ggplot2)
#> Warning: package 'ggplot2' was built under R version 4.2.2

General

whereami()
#> ── Running print(x) at README.Rmd, encoding = UTF-

Plots

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

Shiny

Non RStudio session

If you are running a non RStudio script ie from terminal R/Rscript then the package falls back to thisfile(), which has been migrated from rprojroot::thisfile().

In this case the traceback functionality of whereami() to return the line where the function was sourced is not enabled.

About

❗ This is a read-only mirror of the CRAN R package repository. whereami — Reliably Return the Source and Call Location of a Command. Homepage: https://github.com/yonicd/whereami Report bugs for this package: https://github.com/yonicd/whereami/issues

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages