Skip to content
Reliably return location where command is called from in R.
HTML R CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Merge branch 'master' into counter_df Oct 14, 2019
man Merge branch 'master' into counter_df Oct 14, 2019
revdep add revdep [skip ci] May 5, 2019
tests
vignettes tests: update covrapge with master branch May 5, 2019
.Rbuildignore
.gitignore docs: add CRAN badges to readme Apr 26, 2019
.travis.yml update readme with hexsticker Apr 24, 2019
DESCRIPTION bump: bump version Apr 26, 2019
LICENSE
LICENSE.md init commit Feb 23, 2019
NAMESPACE
NEWS.md Add NEWS.md Apr 26, 2019
README.Rmd
README.md
_pkgdown.yml move hex sticker files to media branch Apr 24, 2019
codecov.yml docs: add coverage badge to readme Apr 20, 2019
cran-comments.md add cran comments and update description title/description for CRAN s… Apr 25, 2019

README.md

CRAN_Status_Badge Travis build status 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)

General

whereami()
#> ── Running From: Console ─────────────────────────

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.

You can’t perform that action at this time.