This is the first CRAN submission version of easytable.
Compared with the earlier GitHub and Zenodo 2.1.0 release, this version includes minor bug fixes, documentation updates, and CRAN-requested formatting changes.
easytable(), format_word(), and format_latex().Removed markdown output mode from easytable(). Supported outputs are now "word" (default) and "latex".
Renamed CSV export argument:
csvexport.csv (must end with .csv)Direct Word file export with new export.word argument (must end with .docx).
easytable(m1, m2, export.word = "mytable.docx")Interaction term wrapping in term column: interaction labels now wrap after * to reduce table width (e.g., x1 * on one line, x2 on the next line).
README.md around a clearer user promise: easy to use, easy to read.penguins-tutorial.developer-roadmap.DESIGN_PHILOSOPHY.mdAI_NOTES.md_pkgdown.yml navigation and article structure.LICENSE.md so the MIT license text is human-readable in the repository.tests/README.md with a deterministic, CI-safe testing protocol.tests/run-tests.R with a committed core profile.tests/testthat/helper-testing-profiles.R for environment-aware test skipping.tests/testthat/test-design-invariants.R to lock key table invariants.validate_output_format() to provide friendly, explicit output-format validation.Direct model interface: New easytable() function accepts model objects directly through dots, like easytable(m1, m2, m3). This provides a more intuitive API for multiple model input.
Default model naming: Model columns are now automatically named "Model 1", "Model 2", etc. when using the new easytable() interface.
Custom model names: Added model.names parameter to specify custom column names for models. Example: easytable(m1, m2, model.names = c("Baseline", "Full"))
Enhanced term label formatting: Term labels are now automatically formatted for improved readability:
digital_confidence:low)var1 * var2)var:L1 for .Q, var:L2 for .L)fin.prud for financial_prudence)Fixed markdown output: Resolved issue with stray vertical bars appearing inside table cells. Markdown tables now use <br> for line breaks within cells, ensuring proper rendering.
Improved markdown formatting: Ensured coefficient formatting (stars, standard errors) is consistent across markdown and LaTeX output formats.
The original easy_table() function with list-based interface remains fully functional for backward compatibility.
All existing code using easy_table(list(Model1 = m1, Model2 = m2)) continues to work without changes.
Most users can adopt the new interface immediately:
# Old way (still works)
models <- list(Model1 = m1, Model2 = m2)
easy_table(models)
# New way (recommended)
easytable(m1, m2)
# With custom names
easytable(m1, m2, model.names = c("Model1", "Model2"))
This is a complete rewrite of easytable with breaking changes. Version 2.0.0 modernizes the package architecture and dramatically expands functionality.
Multi-format output: Now supports Word (via flextable), Markdown (for Quarto/RMarkdown), and LaTeX/PDF output
output parameter: "word", "markdown", or "latex""word" for backward compatibilityModular architecture: Complete refactor into clean, maintainable modules
parse_models.R: Extract coefficients and statisticstransform_table.R: Handle control variables and organizationformat_word.R, format_markdown.R, format_latex.R: Format-specific renderersvalidators.R: Comprehensive input validationEnhanced validation: Informative error messages with clear guidance
Better dependency management:
⚠️ IMPORTANT: The following changes may affect existing code:
Removed runtime installation (CRITICAL SECURITY FIX)
install.packages(c("flextable", "lmtest", "sandwich", "margins"))
Function parameter changes
F and T were acceptedFALSE and TRUE (best practice)F or T, they won't workImproved join operations
Fixed control variable regex bug: Previously, searching for control variable "hp" would also match "hpq". Now uses word boundaries for exact matching.
Fixed deduplication issue: Improved handling of duplicate control variable rows (previously noted as "slight problem" in code)
Explicit namespace calls: All function calls use explicit namespaces (e.g., dplyr::filter) to prevent masking issues
Better handling of GLM models: Improved extraction of fit statistics for generalized linear models
vignette("easytable-intro") with working examplesAI_NOTES.md with architecture and contributor guidelinesGood news: Most basic usage should work without changes!
# This still works exactly the same
easy_table(model_list)
Old behavior (0.1.0):
# Package would auto-install dependencies (security risk!)
easy_table(models)
# Installing package into '~/R/library'...
New behavior (2.0.0):
# Get clear error with installation instructions
easy_table(models)
# Error: Package 'flextable' is required for Word output.
# Install it with: install.packages('flextable')
# You install once:
install.packages("flextable")
# Then use normally:
easy_table(models)
New in 2.0.0:
# Markdown for Quarto/RMarkdown
easy_table(models, output = "markdown")
# LaTeX for PDF
easy_table(models, output = "latex")
All advanced features work the same way:
# Robust SE - still works
easy_table(models, robust.se = TRUE)
# Marginal effects - still works
easy_table(models, margins = TRUE)
# Control variables - still works (now with fixed regex bug!)
easy_table(models, control.var = c("species", "island"))
# Highlighting - still works
easy_table(models, highlight = TRUE)
# CSV export - still works
easy_table(models, csv = "results")
Install what you need:
# For basic usage (Word output)
install.packages(c("broom", "dplyr", "flextable"))
# For robust standard errors
install.packages(c("lmtest", "sandwich"))
# For marginal effects
install.packages("margins")
# For Markdown/LaTeX output
install.packages("knitr")
install.packages("kableExtra") # optional, for enhanced formatting
✅ Function name: easy_table()
✅ Default behavior: Word output via flextable
✅ Parameter names: robust.se, margins, control.var, highlight, csv
✅ Model support: lm, glm
✅ Significance stars: *** p < .01, ** p < .05, * p < .1
✅ Model fit statistics: N, R sq., Adj. R sq., AIC (glm only)
🔄 Must install dependencies manually (no more auto-install) 🆕 New output formats: markdown and latex 🐛 Control variable matching now works correctly 📚 Much better documentation and examples ✅ Comprehensive test coverage 🏗️ Cleaner, more maintainable code architecture
R/parse_models.R)parse_single_model() for individual model parsingformat_coefficients() for significance star formattingextract_model_measures() for fit statisticsparse_models() for multi-model parsingR/transform_table.R)collapse_control_vars() with fixed regex patternsmark_control_vars() for Y indicatorsdeduplicate_control_vars() for cleaning duplicatessort_table() for proper orderingseparate_measures() for bottom placementtransform_table() as main orchestratorR/format_word.R): Extracted and cleaned flextable codeR/format_markdown.R): NEW - knitr/kableExtra supportR/format_latex.R): NEW - LaTeX with booktabsR/validators.R)validate_model_list() with clear error messagesvalidate_model_types() for supported model checkingvalidate_control_vars() with warnings for missing varsvalidate_parameters() for type checkingR/easytab.R)output parameter with validationThe modular architecture in 2.0.0 makes it easy to add:
Found a bug? Have a feature request? Please open an issue on GitHub: https://github.com/alfredo-hs/easytable/issues
Initial release (2024)
Note: Version 0.1.0 had critical issues:
All issues resolved in 2.0.0.