whereami v0.1.8.1

0

Monthly downloads

0th

Percentile

Reliably Return the Source and Call Location of a Command

Robust and reliable functions to return informative outputs to console with the run or source location of a command. This can be from the 'RScript'/R terminal commands or 'RStudio' console, source editor, 'Rmarkdown' document and a Shiny application.

Readme

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.

Functions in whereami

Name Description
cat_where cat function for whereami
thisfile Determines the path of the currently running script in terminal
whereami Return where the script is run from
counter_state whereami counter
No Results!

Vignettes of whereami

Name
cat_where.Rmd
cat_where.png
plots.Rmd
shiny.Rmd
tables.Rmd
tests_and_coverage.Rmd
No Results!

Last month downloads

Details

Type Package
License MIT + file LICENSE
URL https://github.com/yonicd/whereami
BugReports https://github.com/yonicd/whereami/issues
Encoding UTF-8
LazyData true
RoxygenNote 6.1.1
VignetteBuilder knitr
NeedsCompilation no
Packaged 2019-05-05 18:45:00 UTC; yonis
Repository CRAN
Date/Publication 2019-05-05 19:00:03 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/whereami)](http://www.rdocumentation.org/packages/whereami)