print.ThisPathDocumentContext | R Documentation |
Print a \stringThisPathDocumentContext object.
## S3 method for class 'ThisPathDocumentContext'
print(x, ..., quote = TRUE)
## S3 method for class 'ThisPathDocumentContext'
format(x, ...)
## S3 method for class 'ThisPathDocumentContext'
as.character(x, ...)
x |
object of class \stringThisPathDocumentContext. |
... |
unused. |
quote |
logical, indicating whether or not strings should be printed with surrounding quotes. |
An object of class \stringThisPathDocumentContext is generated upon calling
set.sys.path()
, wrap.source()
,
sys.path()
, env.path()
, or
src.path()
, and by extension this.path()
. It
contains information about the path of the executing / / current script.
These objects are not usually user-visible.
for print.ThisPathDocumentContext()
, x
invisibly.
for format.ThisPathDocumentContext()
, a character vector of lines.
for as.character.ThisPathDocumentContext()
, a character string of
concatenated lines.
fun <- function (file)
{
set.sys.path(file, Function = "fun")
`.@R_PACKAGE_NAME@::document.context`
}
fun()
fun("clipboard")
fun(paste0("https://raw.githubusercontent.com/ArcadeAntics/",
"this.path/main/tests/sys-path-with-urls.R"))
FILE.R <- tempfile(fileext = ".R"); file.create(FILE.R)
x <- fun(FILE.R)
print(x)
print(x, quote = FALSE)
format(x)
as.character(x)
unlink(FILE.R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.