powered by
Source (via sys.source()) and attach (attach) an R source file.
sys.source()
attach
sourceAttach(file, pos=2, name = paste(abbreviate(gsub(fsep,"", dirname(file)), 12, method="both.sides"), basename(file), sep=fsep), keep.source = getOption("keep.source.pkgs"), warn.conflicts = TRUE)
the return value of attach().
attach()
file name
passed to attach()
character, with a smart default, passed to attach().
logical, see sys.source().
logical, see attach.
Martin Maechler, 29 Jul 2011
attach, sys.source, source
sys.source
source
sourceAttach(system.file("test-tools-1.R", package="Matrix", mustWork=TRUE)) search() # shows the new "data base" at position 2 ## look what it contains: ls.str(pos = 2)
Run the code above in your browser using DataLab