saveSetup: Saves a list of metadata objects to a new setup file

Description Usage Arguments Value Examples

View source: R/update.R

Description

Saves a list of metadata objects to a new setup file

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
saveSetup(
  name,
  author,
  mail,
  inst,
  cit = "Unpublished",
  objects,
  table,
  seedinfo = list(100, paste(R.version$major, R.version$minor, sep = "."), RNGkind()),
  metaseedinfo = list(100, paste(R.version$major, R.version$minor, sep = "."),
    RNGkind()),
  custom_funcs = NULL,
  custom_name = NULL
)

Arguments

name

The name of the new setup (and thus also the filename)

author

Full name of the author

mail

Contact e-mail address of the author

inst

Institution of the author

cit

Reference to the publication where the setup was used, defaults to unpublished

objects

List of metadata objects

table

Info table for the setup

seedinfo

Random number generator parameters for the data sets

metaseedinfo

Random number generator parameters for the metadata

custom_funcs

Custom functions that are needed to generate the meta(data)

custom_name

Custom filename that deviates from the authorYear format

Value

A .R file that can be processed by create.dataset

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(MASS)
a = new("metadata.metric", 
        clusters = list(c1 = list(n = 25, mu = c(4,5), Sigma=diag(1,2)),
                        c2 = list(n = 25, mu = c(-1,-2), Sigma=diag(1,2))),
                        genfunc = mvrnorm)
b = new("metadata.metric", 
        clusters = list(c1 = list(n = 44, mu = c(1,2), Sigma=diag(1,2)),
                        c2 = list(n = 66, mu = c(-5,-6), Sigma=diag(1,2))),
                        genfunc = mvrnorm)
## Not run: 
saveSetup(name="doe2002.R", author="John Dow", mail="john.doe@edu.com",
           inst="Example University", cit="Simple Data, pp. 23-24", objects=list(a, b),
           table=data.frame(n = c(50, 110), k = c(2,2), shape = c("spherical", "spherical")))
unlink("doe2002.R")

## End(Not run)        

bdlp documentation built on Jan. 13, 2021, 5:27 p.m.