The lazyLoad
function works primarily by side-effect, which to me means you shouldn't rely on (nor be discouraged by) the NULL
output.
For instance,
ls()
# character(0)
lazyLoad("c:/Users/r2/R/win-library/4.0/yaml/help/yaml", envir = .GlobalEnv)
# NULL
ls()
# [1] "as.yaml" "read_yaml" "write_yaml" "yaml.load"
as.yaml
# itle{ Convert an R object into a YAML string }
ame{as.yaml}alias{as.yaml}keyword{ data }keyword{ manip }description{
# Convert an R object into a YAML string
# }usage{
# as.yaml(x, line.sep = c("
", "
", "
"), indent = 2, omap = FALSE,
# column.major = TRUE, unicode = TRUE, precision = getOption('digits'),
# indent.mapping.sequence = FALSE, handlers = NULL)
# }.......
If you want the objects to be available in a specific location, then control where it's going a little better. (The envir=parent.frame()
you're using seems like it would be polluting the calling environment with these promise objects of help docs.)
e <- new.env(parent = emptyenv())
lazyLoad("c:/Users/r2/R/win-library/4.0/yaml/help/yaml", envir = e)
# NULL
ls(e)
# [1] "as.yaml" "read_yaml" "write_yaml" "yaml.load"
e$as.yaml
# itle{ Convert an R object into a YAML string }
ame{as.yaml}alias{as.yaml}keyword{ data }keyword{ manip }description{
# Convert an R object into a YAML string
# }usage{
# as.yaml(x, line.sep = c("
", "
", "
"), indent = 2, omap = FALSE,
# column.major = TRUE, unicode = TRUE, precision = getOption('digits'),
# indent.mapping.sequence = FALSE, handlers = NULL)
# }......
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…