Learn R Programming

testex (version 0.2.1)

srcref_key: Convert a srcref to a character representation

Description

Convert a srcref to a character representation

Usage

srcref_key(x, nloc = 2, path = c("base", "root", "full"))

Value

A string hash of a srcref

Arguments

x

A srcref object

nloc

The number of locations (utils::getSrcLocation) to use. Defaults to 2, indicating starting and ending line number.

path

A form of file path to use for the key. One of "base" for only the basename of the source file path, "root" for a path relative to a package root directory if found, or "full" for the full file path.