R/ismain.R

##
## this.path : Get Executing Script's Path
## Copyright (C) 2022-2024   Iris Simmons
##


is.main <- function ()
# {
#     n <- .External2(.C_getframenumber)
#     if (is.na(n))
#         NA
#     else if (n)
#         FALSE
#     else TRUE
# }
!.External2(.C_getframenumber)


delayedAssign(".has_shINPUT", { .in_shell && .shINFO[["has_input"]] })


from.shell <- function ()
{
    n <- .External2(.C_getframenumber)
    if (is.na(n))
        NA
    else if (n)
        FALSE
    else .has_shINPUT
}

Try the this.path package in your browser

Any scripts or data that you put into this service are public.

this.path documentation built on April 10, 2026, 9:10 a.m.