Read.table for an Emacs Org Table
read.org.table.RdRead an emacs “Org” table (in file or text) by
read.table().
Usage
read.org.table(file, header = TRUE, skip = 0,
encoding = "native", fileEncoding = "", text, quiet=FALSE, ...)Arguments
- file
a file name, a
fileor other connection.- header
logical indicating if the org table has header line (in the usual
"|"-separated org table format).- skip
integer number of initial lines to skip.
- encoding
to be used in the main
readLines(file, encoding=encoding)call.- fileEncoding
if
fileis a file name, i.e., acharacterstring, andfileEncodingis not the empty string,file(file, "rt", encoding = fileEncoding)will be used.- text
instead of
file, acharacteror string (of a few lines, typically).- quiet
logicalto suppress themessagewhich is signalled when nonrows=*has been specified and the automatic number of rows is smaller than 95% of the rows / non-header lines of thefile.- ...
further arguments passed to
read.table. You should not useencoding(but possiblyfileEncoding!) here, as we do not callread.tableonfile(but on atextConnection).
Note
TODO: It should be easy to extend read.org.table() to also
work for some of the proposed Markdown formats for tables.
Please write to maintainer("sfsmisc") or open a
github issue if you are interested.
References
Org-Mode Manual on tables, https://orgmode.org/manual/Tables.html
Org tutorial for tables, https://orgmode.org/worg/org-tutorials/tables.html
See also
CRAN package ascii
can write org tables.
read.table