Learn R Programming



lazyWeave

The motivation behind lazyWeave was to reproducible reports among those R users who hadn't yet learned LaTeX. It was, in my opinion, a noble goal, but happened to coincide with the wiser efforts behind the development of the knitr and rmarkdown packages. The development of these tools, which have become so common in the R community, have rendered most of the functionality of lazyWeave obsolete.

So at this point, we may ask, "why lazyWeave at all?" There are a handful of functions that I find quite useful still, and they can still be used in the rmarkdown documents. The functions you'll likely find most useful are:

  • lazy.matrix
  • lazy.table
  • cattable
  • conttable
  • catconttable
  • univ

All of these functions are capable of producing output in LaTeX, HTML, and RMarkdown.

lazyWeave is somewhat similar to the xtable package. What are the advantages of lazyWeave? To be honest, there really aren't a lot. In fact, xtable has quite a few more bells and whistles than lazy.matrix. For instance, with xtable you can turn column headings sideways, or use the longtable package in LaTeX. Eventually, I may add support for these features.

The only advantage lazy.matrix has over xtable is the ability to apply colors to the background of table rows.

The other advantage over xtable is the ability to define multicolumn cells (in LaTeX and HTML only) when building custom tables with lazy.table.

Beyond those basics, cattable, conttable, catconttable, and univ provide ready-made functionality for basic summaries with univariable comparisons. In fact, you may find that they are generally publication ready out of the box.

Copy Link

Version

Install

install.packages('lazyWeave')

Monthly Downloads

251

Version

3.0.2

License

GPL

Maintainer

Last Published

January 25th, 2018

Functions in lazyWeave (3.0.2)

lazy.citation

Add R or R Package Citation
lazy.counter

Create and Manage Counters for LaTeX Documents
Scout

Scout Advancement Data
WritePrintCtable

Write and Print Comparison Tables
is_significant

Test the significance of a p-value
lazy.build

Compile a PDF or HTML Report
lazy.matrix

Convert Matrix to LaTeX Table
lazy.page.break

Start New Page in LaTeX
lazy.section

Open Sections in LaTeX Documents
lazy.table

Tables in LaTeX
ComparisonTable

Comparison Tables
Delivery

Obstetric Delivery Log
lazy.file.start

Initiate New LaTeX, HTML, or Markdown Files
lazy.footnote

Add a Footnote
lazy.page.number

Change Page Numbering
lazy.label

Reference Tables, Figures, Sections, and Pages
lazy.toc

Table of Contents and Other Lists
lazy.verbatim.end

Verbatim Environments
mantel.test

Mantel-Haenszel test for two-way tables
map.size

Convert text size specifications between LaTeX and HTML formats
univ

Univariable Table
write.univ

Write Univariate Table to a File
lazy.link

Links to Webpages or External Documents
lazy.list

Lists in LaTeX and HTML
lazy.write

Output LaTeX Code to a File
lazyWeave

Generate Latex or HTML reports from R
lazy.figure

Include Figures in Latex Documents
lazy.file.end

End LaTeX Documents
lazy.insert.code

Insert Code to a TeX or HTML document
lazy.landscape

Landscape Page Orientation
lazy.text

Paragraphs in LaTeX
lazy.text.format

Format Text
pvalString

Format P-values for Reports
setHtmlOptions

lazyWeave HTML Report Options