Learn R Programming

broman (version 0.59-5)

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, maxdig = 5,
  verbose = TRUE)

Arguments

i
An integer or character string.
stem
Initial part of name.
end
Last part of name.
fixdig
If TRUE, pad i with 0's until file exists (up to maxdig)
maxdig
Maximum number of 0's to add
verbose
If true, print a message if the file can't be loaded.

Value

  • TRUE/FALSE according to whether the file was attached.

Details

This function attaches the workspace paste(stem,i,end,sep=""), possibly adding 0's before i

See Also

loadfile

Examples

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

Run the code above in your browser using DataLab