This help topic is for R version 0.60. For the current version of R, try https://stat.ethz.ch/R-manual/R-patched/library/base/html/autoload.html
autoload {base}R Documentation

On-demand loading of packages

Description

Creates a promise-to-evaluate a loader function and stores it in the .AutoloadEnv environment. When R attempts to evaluate name the package is loaded and name is re-evaluated in the new package's environment. The result is that R behaves as if file was loaded but it does not occupy memory.

Usage

autoload(name, file)

Arguments

name

string giving the name of an object

file

string giving the name of a package containing the object

Value

nothing interesting

See Also

delay, library

Examples

autoload("line","eda")
search()
ls("Autoloads")
all(ls("Autoloads") == ls(envir = .AutoloadEnv))
data(cars)
plot(cars)
z<-line(cars)
abline(coef(z))
search()
detach("package:eda")
search()
z<-line(cars)
search()

[Package base version 0.60 ]