do.or.load: Function that either loads an Rdata file, or saves the result...

Description Usage Arguments Examples

View source: R/do.or.load.R

Description

Function that either loads an Rdata file, or saves the result of a function call to the Rdata file.

Usage

1
2
# example usage
do.or.load (file.path,fun,...)

Arguments

...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
do.or.load('test.Rdata',function(x){ 
  x<-1
  y<-2
  list('x.var'=x,'y.var'=y)
})

colinsheppard/colinmisc documentation built on July 10, 2020, 5:59 p.m.