Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 842259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:55:50+00:00 2026-05-15T05:55:50+00:00

I’ve been using xtable package for a long time, and looking forward to writting

  • 0

I’ve been using xtable package for a long time, and looking forward to writting my first package in R… so I reckon that if I have some “cool” idea that’s worth carying out, there’s a great chance that somebody got there before me… =)

I’m interested in functions/packages specialized for LaTeX table creation (through R, of course). I bumped on quantreg package which has latex.table function. Any suggestion for similar function(s)/package(s)?

P.S.
I’m thinking about building a webapp in which users can define their own presets/templates of tables, choose style, statistics, etc. It’s an early thought, though… =)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:55:51+00:00Added an answer on May 15, 2026 at 5:55 am

    I sometimes divide the task of creating LaTeX tables into two parts:

    1. I’ll write the table environment, caption, and tabular environment commands directly in my LaTeX document.
    2. I’ll export just the body of the table from R using a custom function.

    The R export part involves several steps:
    Starting with a matrix of the whole table including any headings:

    1. Add any LaTeX specific formatting to the table. E.g., enclose digits in dollar symbols to ensure that negative numbers display correctly.
    2. Collapse rows into a single character value by replacing separate columns with the ampersand (&) and adding ends-of-row symbols “\\”
    3. Add any horizontal lines to be displayed in the table. I use the booktabs LaTeX package.
    4. Export the resulting character vector using the write function

    The exported text file is then imported using the input command in LaTeX. I ensure that the file name corresponds to the table label.

    I have used this approach in the context of writing journal articles.
    In these cases, there are a lot of different types of tables (e.g., multi-page tables, landscape tables, tables requiring extended margins, tables requiring particular alignment, tables where I want to change the wording of the table title). In this setting, I’ve mostly found it easier to just export the data from R. In this way, the result is reproducible research, but it is easier to tweak aspects of table design in the LaTeX document. And in the context of journal articles, there are usually not too many tables and rather specific formatting requirements.

    However, I imagine if I were producing large numbers of batch reports, I’d consider exporting more aspects directly from R.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 419k
  • Answers 419k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I figured it out. I was using rails word_wrap helper… May 15, 2026 at 10:15 am
  • Editorial Team
    Editorial Team added an answer You probably need to put your Extensions namespace in web.config:… May 15, 2026 at 10:15 am
  • Editorial Team
    Editorial Team added an answer You should be able to do this in the controller:… May 15, 2026 at 10:15 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.