View source: R/pipeline_convert.R
terminal_munge | R Documentation |
Split and produce data from terminal output
terminal_munge(
terminal_output,
matchpattern = NULL,
splitpattern = NULL,
colnames = NULL,
has_header = T
)
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. |
A list including a tibble of the output, and, if the output consists of attributes and values, then it will also include a list.
hdr_dat <- terminal_munge(outcome_hdr, matchpattern='(.*)\\:\\= (.*)')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.