writeStatus: writeStatus

View source: R/Functions_xcmsRunner.R

writeStatusR Documentation

writeStatus

Description

Write or update a status dataframe with custom messages, time stamp and time elapsed since last status. Useful to document time consumed by analysis steps.

Usage

writeStatus(
  previous = NULL,
  message = list(Status = "Starting analysis", Details = "loading files"),
  wd = getwd()
)

Arguments

previous

a writeStatus object to be updated (must have same column names): new object generated if NULL.

message

named list of columns with elements Status and Details, specifying the progress message for thsi step

wd

directory where the status.csv file should be written and updated. If NULL, no status.csv is written.

Details

A writeStatus object is a named list with two elements:

pt

current proc.time()

,

status

A data.frame with progress messages in rows, and these columns:

  • Time time stamp of analysis step

  • Status status message/ analysis step

  • Details details on analysis step

  • elapsed_time total elapsed time

Value

returns a writeStatus object, see Details and writes to a status.csv file in wd

Examples


status <- writeStatus(previous = NULL,
            message = list(Status = "Starting analysis",
                           Details = "loading files"
                          ),
           wd = getwd())
           
           
status <- writeStatus(previous = status,
            message = list(Status = "Running analysis",
                           Details = "detecting features"
                          ),
           wd = getwd())


mjhelf/Metaboseek documentation built on April 23, 2022, 12:09 p.m.