Examples for 'utils::getSrcFilename'


Source Reference Utilities

Aliases: getSrcFilename getSrcDirectory getSrcref getSrcLocation

Keywords: utilities

### ** Examples

fn <- function(x) {
  x + 1 # A comment, kept as part of the source
}

# Show the temporary file directory
# where the example was saved

getSrcDirectory(fn)
character(0)
getSrcLocation(fn, "line")
[1] 5

[Package utils version 4.2.3 Index]