extractTable: Function extractTable

extractTableR Documentation

Function extractTable

Description

Extracts table as data.frames from multiple lines of text.

Usage

extractTable(
  x,
  reg.up = NULL,
  reg.down = NULL,
  reg.left = "^",
  reg.right = "$",
  reg.fix = NULL,
  header = F,
  trim = T,
  convert = F,
  correctNotation = F
)

Arguments

x

A character element containing all the text toextract the table from (or a character vector containing one text-line per element).

reg.up

Regular expression spefifying the top of the table. Defaults to NULL.

reg.down

Regular expression spefifying the bottom of the table. Defaults to NULL.

reg.left

Regular expression spefifying the bottom of the table. Defaults to "^".

reg.right

Regular expression spefifying the bottom of the table. Defaults to "$"

reg.fix

Regular expression spefifying the bottom of the table. Defaults to NULL.

header

Logical value that specifies, whether to treat first row and column as row- and column-names. Defaults to F.

trim

Logical value that specifies, whether to trim entries. Defaults to T.

convert

Logical value that specifies, whether to convert table to numeric (after correcting for notation in case correctNotation is set to T). Please use with care, if table contains non-numeric information. Defaults to T.

correctNotation

Logical value that specifies, whether to correct for the fact that entries use commata instead of dots. Erases all dots in all entries and subsequently replaces commata by dots. Defaults to F.

Details

Extracts table as data.frames from multiple lines of text. Columns are assumed to be separated by whitespaces that are placed at the same position in each line. Please make sure that headers don't span multiple columns or rows.


AndreasFischer1985/quantqual documentation built on June 20, 2022, 4:55 p.m.