terminal_munge: Munge terminal output

View source: R/pipeline_convert.R

terminal_mungeR Documentation

Munge terminal output

Description

Split and produce data from terminal output

Usage

terminal_munge(
  terminal_output,
  matchpattern = NULL,
  splitpattern = NULL,
  colnames = NULL,
  has_header = T
)

Arguments

terminal_output

Raw terminal output. Make sure that it consists of one data rectangle.

matchpattern

Regex pattern for dividing the data set. Uses stringr::str_match. Specify either matchpattern or splitpattern.

splitpattern

Regex pattern for splitting the data set. Uses stringr::str_split. Specify either splitpattern or matchpattern.

colnames

What should the column names of the tibble? If the terminal output is a list of attributes and their values, then it will be handled automatically.

has_header

Does the table have a header inside it. Default is TRUE.

Value

A list including a tibble of the output, and, if the output consists of attributes and values, then it will also include a list.

Examples

hdr_dat <- terminal_munge(outcome_hdr, matchpattern='(.*)\\:\\= (.*)')


mathesong/kipettools documentation built on Feb. 5, 2024, 10:10 p.m.