generic.log: Wrapper for 'generic.process'

View source: R/generic.log.R

generic.logR Documentation

Wrapper for generic.process

Description

This function is mainly a wrapper for generic.process, diverting messages, warnings and errors to a more readable log file.

Usage

  generic.log(..., logFile)

Arguments

...

Arguments to be passed to generic.process.

logFile

Single character value, the path and name of the log file where to divert output.

Value

Either an error object if one occured, an integer number of warnings which happened during the (otherwise successfull) processing or TRUE if everything went fine.

Author(s)

Sylvain Mareschal

See Also

generic.process, generic.interface

Examples

  # Working in temporary directory
  output <- sprintf("%s/GEP", tempdir())
  logFile <- sprintf("%s.log", output)
  
  # Direct analysis
  generic.process(
    input = system.file("extdata/fsa_GEP", package="FSAtools"),
    design = system.file("extdata/design_GEP.conf", package="FSAtools"),
    output = output
  )
  
  # Logged analysis (check logFile)
  generic.log(
    input = system.file("extdata/fsa_GEP", package="FSAtools"),
    design = system.file("extdata/design_GEP.conf", package="FSAtools"),
    output = output,
    logFile = logFile
  )

FSAtools documentation built on Aug. 19, 2023, 1:06 a.m.