setEctdVerbose: MSToolkit package options

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/metaManagement.R

Description

Options used by the MSToolkit package to control the logfile, the amount of messages that are written in the logfile, and the format of the date.

Usage

1
2
3
4
5
6
7

Arguments

verbose

(Required) A logical value. If set to TRUE, messages are sent to the logfile during the process of generating the data and analyzing it. Set to TRUE when attaching the package.

file

(Required) Log File to write messages in. It is eventually use by cat, so file="" will send the output messages back to the standard output. Set to "ectd.log" when attaching the package.

format

(Required) Format for the date. See strptime. Set to a default value when the package is attached.

Details

The three function write and read information from the (not exported) environment .ectdEnv. These settings are mainly used by the (not exported) .log function.

Value

The function (invisibly) returns the previous value of the arguments.

Author(s)

Mike K Smith mstoolkit@googlemail.com

See Also

options provides a similar mechanism for R options.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
  oldverb <- setEctdVerbose( TRUE )
  olddf   <- setEctdDateFormat("
  oldlf   <- setEctdLogFile("mstoolkit.log")
  
  for( i in 1:100 ) {
    MSToolkit:::.log( paste("some message:", i) )
  }
  file.show( getEctdLogFile() )
  
  setEctdVerbose   (oldverb)
  setEctdDateFormat(olddf  )
  setEctdLogFile   (oldlf  )
 

## End(Not run)

MSToolkit documentation built on May 2, 2019, 6:30 p.m.