# NOT RUN {
x <- list(
TRUE,
1L,
runif(100),
"3"
)
sxp(x)
# Expand "character" to see underlying CHARSXP entries in the global
# string pool
x <- c("banana", "banana", "apple", "banana")
sxp(x)
sxp(x, expand = "character")
# Expand altrep to see underlying data
x <- 1:10
sxp(x)
sxp(x, expand = "altrep")
# Expand environmnets to see the underlying implementation details
e1 <- new.env(hash = FALSE, parent = emptyenv(), size = 3L)
e2 <- new.env(hash = TRUE, parent = emptyenv(), size = 3L)
e1$x <- e2$x <- 1:10
sxp(e1)
sxp(e1, expand = "environment")
sxp(e2, expand = "environment")
# }
Run the code above in your browser using DataLab