Combine and Export Data Frames

Functions to combine data.frames in ways that require additional effort in base R, and to add metadata (id, title, ...) that can be used for printing and xlsx export. The 'Tatoo_report' class is provided as a convenient helper to write several such tables to a workbook, one table per worksheet. Tatoo is built on top of 'openxlsx', but intimate knowledge of that package is not required to use tatoo.


CRAN status

There were some minor issues with the last tatoo version that CRAN didn't like. I hope to get it back up asap.

Overview

tatoo ("table tools") provides functions to combine data.frames in ways that require additional effort in base R, and to add metadata (id, title, ...) that can be used for printing and xlsx export. The 'Tatoo_report' class is provided as a convenient helper to write several such tables to a workbook, one table per worksheet. In addition, the Tatto_report class is provided as a convenient helper to write several such tables to a workbook, one table per worksheet.

Installation

# tatoo is available from CRAN
install.packages("tatoo")
 
# Or you can install the development version from GitHub:
install.packages("devtools")
devtools::install_github("statistikat/tatoo")

Example

tag_table(head(cars), tt_meta(table_id = "t1", title = "Data about cars"))
mash_table(head = head(cars), tail = tail(cars), mash_method = "row")
mash_table(head = head(cars), tail = tail(cars), mash_method = "col")
comp_table(head = head(cars), tail = tail(cars))
stack_table(head = head(cars), tail = tail(cars))

None of the examples are particularily hard to do in base R, but tatoo provides functions with a clean interface and nice print and export methods for the created objects. Please refer to the package vignette for more examples.

News

tatoo 1.0.10

  • Bugfix release
  • Fixed faulty example code for open_file()
  • Removed default arguments of save_*() functions (they wrote to the users home directory by default)

tatoo 1.0.9

  • Convert Tatoo_table objects to Latex code or save them directly to .pdf with as_latex() and save_pdf() (experimental).
  • Added open_file() utility to open files with external programs.
  • Added view_pdf() and view_xlsx() for directly viewing tables in a .pdf viewer or spreadsheet program
  • save_xlsx() now returns the path to the saved workbook, raher than the workbook object
  • Various small fixes related to print() methods

tatoo 1.0.8

  • Support color themes for printing via colt and crayon

tatoo 1.0.7

  • Minor tweaks for compatibility with purrr 0.2.2
  • as_Composite_table.data.table() converts data.tables to Composite tables, based on separators in the column names (e.g fruit.apple, fruit.banana)
  • Improved README / vignette / documentation
  • Changed how as.data.table.Composite_table() constructs column names. The new format is colname.multiname instead of multiname.colname. This is to emulate the behaviour of base::merge()
  • flip_names() can flip names and multinames of a composite table (at the cost of reordering the columns)

tatoo 1.0.6

  • Removed dplyr dependency

tatoo 1.0.5

  • Initial CRAN release.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("tatoo")

1.1.0 by Stefan Fleck, 5 months ago


https://github.com/statistikat/tatoo


Report a bug at https://github.com/statistikat/tatoo/issues


Browse source code at https://github.com/cran/tatoo


Authors: Stefan Fleck [aut, cre]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports assertthat, magrittr, data.table, openxlsx, purrr, rlang, stringi, colt, crayon, withr

Suggests testthat, rprojroot, kableExtra, knitr, rmarkdown


See at CRAN