Learn R Programming

broman (version 0.48-2)

attachfile: Attach a workspace

Description

Attach a workspace for a directory name of a particular form.

Usage

attachfile(i, stem = "perm", end = ".RData", fixdig = TRUE,
  verbose = TRUE)

Arguments

i
An integer or character string.
stem
Initial part of name.
end
Last part of name.
fixdig
If TRUE and i is an integer < 10, append a 0 to i.
verbose
If true, print a message if the file can't be loaded.

Value

  • TRUE/FALSE according to whether the file exists (and so the function worked).

Details

This function attaches the workspace paste(stem,i,end,sep=""), possibly adding a 0 before i if i < 10.

See Also

loadwork, attachwork, loadfile

Examples

Run this code
for(i in 1:5) attachfile(i)

Run the code above in your browser using DataLab