sexp_type

0th

Percentile

Inspect internal attributes of R objects.

typename determines the internal C typename, address returns the memory location of the object, and refs returns the number of references pointing to the underlying object.

Usage
sexp_type(x)

inspect(x, env = parent.frame())

refs(x)

address(x)

typename(x)

Arguments
x

name of object to inspect. This can not be a value.

env

When inspecting environments, don't go past this one.

Non-standard evaluation

All functions uses non-standard evaluation to capture the symbol you are referring to and the environment in which it lives. This means that you can not call any of these functions on objects created in the function call. All the underlying C level functions use Rf_findVar to get to the underlying SEXP.

See Also

Other object inspection: ftype, otype

Aliases
  • sexp_type
  • inspect
  • inspect
  • refs
  • address
  • typename
Examples
# NOT RUN {
x <- 1:10
# }
# NOT RUN {
.Internal(inspect(x))
# }
# NOT RUN {
typename(x)
refs(x)
address(x)

y <- 1L
typename(y)
z <- list(1:10)
typename(z)
delayedAssign("a", 1 + 2)
typename(a)
a
typename(a)

x <- 1:5
address(x)
x[1] <- 3L
address(x)
# }
Documentation reproduced from package pryr, version 0.1.4, License: GPL-2

Community examples

Looks like there are no examples yet.