Giter Site home page Giter Site logo

stats4sd / juneseminartablesfromr Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 69.56 MB

Materials and Resources for making tables in the 3 different packages demonstrated during our June 10th seminar on exporting tables from R into different formats - Alex Thomson

License: GNU General Public License v3.0

HTML 100.00%
seminar rstudio rmarkdown tables gt flextable kable kableextra

juneseminartablesfromr's Introduction

Exporting Tables From R

This repository is based on an internal seminar given at Stats4SD. The presentation and accompanying code examples present a set of options for generating and exporting lovely tables from R into pdf, html, Word etc.

The examples focus on 3 packages:

  • Flextable
  • Kable
  • gt

How to run the examples

  1. Clone this repository to a new folder locally.
  2. Open any of the Rmd files in RStudio.
  3. Run the first chunk to load required libraries.
    • If you get errors, check you have the required libraries installed.
  4. Change the working directory to your new local folder
  5. Run any of the other chunks to see the sorts of output you can get.
  6. If you want to see how all of your tables will appear in html, press the "knit" button in the bar at the top of the markdown file and then press "knit to html"
  7. If you want to try knitting the flextable examples into word then you can do one of two things
  8. Remove the special example which includes images and then this will run just fine; or;
  9. Ensure the package "officedown" is installed and loaded. Then add the code output::officedown:rdocx_document to the YAML header at the top of the RMD script. Then you will be able to knit to a rdoxc word document (officedown is used to format word documents from rmakdown, this is just the name of the output type it creates but it will just open a normal document in microsoft word)

juneseminartablesfromr's People

Contributors

alex-thomson222 avatar ciara-mc avatar dave-mills avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.