Printing Floating Point Numbers in a Human-Friendly Format

Print vectors (and data frames) of floating point numbers using a non-scientific format optimized for human readers. Vectors of numbers are rounded using significant digits, aligned at the decimal point, and all zeros trailing the decimal point are dropped. See: Wright (2016). Lucid: An R Package for Pretty-Printing Floating Point Numbers. In JSM Proceedings, Statistical Computing Section. Alexandria, VA: American Statistical Association. 2270-2279.


Lucid printing in R

'lucid' is primarily a formatting function similar to 'round' and 'signif', but output is always character.

The returned values are printed with regular R methods.

Note that R prints character vectors/matrices with quotes, but prints data.frames without quotes.


lucid 1.7 - Feb 2019

Fix test case to accommodate changes in lme4 output.

lucid 1.6

lucid 1.5 - Aug 2018

lucid() now converts tibbles to data.frames before formatting.

lucid 1.4 - Oct 2016

Added lucid logo, JSM poster & paper to github.

Changed vignette from Rnw to Rmd.

Switched to roxygen2 documentation.

Now using testthat and covr packages.

lucid 1.3 - Jun 2015

Namespace changes due to R devel changes.

lucid 1.2 - Apr 2015

Added vc.mcmc.list() for prettier summaries from JAGS.

lucid 1.1 - Feb 2015

Re-worked code. Primary objective is formatting, not printing.

Added na.replace option.

lucid 1.0 - Nov 2014

First release to CRAN, Nov 2014.

lucid 0.0 - Mar 2010

Development begins

Reference manual

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


1.8 by Kevin Wright, 7 months ago

Report a bug at

Browse source code at

Authors: Kevin Wright [aut, cre]

Documentation:   PDF Manual  

GPL-3 license

Imports nlme

Suggests broom, dplyr, knitr, lattice, lme4, rjags, rmarkdown, sommer, testthat

Suggested by agridat.

See at CRAN