sourceAttach {sfsmisc} | R Documentation |
Source (via sys.source()
) and attach
(attach
) an R source file.
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)
file |
file name |
pos |
passed to |
name |
character, with a smart default, passed to |
keep.source |
logical, see |
warn.conflicts |
logical, see |
the return value of attach()
.
Martin Maechler, 29 Jul 2011
sourceAttach(system.file("test-tools.R", package="Matrix")) search() # shows the new "data base" at position 2 ls(pos = 2)