get_current_document: Guess the current document

Description Usage Details Value Examples

View source: R/current_document.R

Description

get_current_document() makes a guess at what the path to the current document is. Returns the character "console" when it can't find the document. This is a decent proxy for finding the document this function was run in.

Usage

1

Details

When executed interactively within RStudio, it reports the currently opened document at the time of execution. If the active document is switched between queuing this function and execution, the document of origin might be misreported.

Value

A character with the path to the document

Examples

1

teunbrand/datastamp documentation built on Dec. 31, 2020, 8:34 a.m.