# Learn Data Science for Business

## Become a Data Scientist in our online courses

Earn 6 figures or more in 6 months or less by learning R, Shiny, Machine Learning, Time Series, Web Apps, AWS, Cloud, and more!

5-10 Hours Per Week.  80/20 Skills.  End-To-End Business Projects.

[Start Your Courses Now! 👉](https://university.business-science.io/p/5-course-bundle-machine-learning-web-apps-time-series?el=website)

Join over 100,000+ Data Scientists

# Introducing gt_summarytools: Analyze Your Data Faster With R

_Written by Matt Dancho_

* * *

Hey guys, welcome back to my [R-tips newsletter](https://learn.business-science.io/r-tips-newsletter?el=website). In today’s fast-paced data science environment, speeding up exploratory data analysis (EDA) is more critical than ever. This is where `gt_summarytools()` comes in. A new function I’ve developed, `gt_summarytools()`, combines the best features of `gt` and `summarytools`, allowing you to create detailed, interactive data summaries faster and with more flexibility than ever. Let’s go!

### Table of Contents

Here’s what you’re learning today:

- **Why Quick Data Analysis Matters**

- **Introducing `gt_summarytools()`**:

- Combining the Best of `gt` and `summarytools`
  - Creating Summaries with `gt_summarytools()`
- **Get the Code**: **[Join the R-Tips Newsletter](https://learn.business-science.io/r-tips-newsletter?el=website)** to get the code and stay updated.

[Get the Code (In the R-Tip 085 Folder)](https://learn.business-science.io/r-tips-newsletter?el=website)

* * *

# SPECIAL ANNOUNCEMENT: AI for Data Scientists Workshop on December 18th

[Inside the workshop](https://learn.business-science.io/ai-register) I’ll share how I built a SQL-Writing Business Intelligence Agent with Generative AI:

**What:** GenAI for Data Scientists

**When:** Wednesday December 18th, 2pm EST

**How It Will Help You:** Whether you are new to data science or are an expert, Generative AI is changing the game. There’s a ton of hype. But how can Generative AI actually help you become a better data scientist and help you stand out in your career? I’ll show you inside [my free Generative AI for Data Scientists workshop](https://learn.business-science.io/ai-register).

**Price:** Does **Free** sound good?

**How To Join:** [**👉 Register Here**](https://learn.business-science.io/ai-register)

* * *

# R-Tips Weekly

This article is part of R-Tips Weekly, a [weekly video tutorial](https://learn.business-science.io/r-tips-newsletter?el=website) that shows you step-by-step how to do common R coding tasks. Pretty cool, right?

Here are the links to get set up. 👇

- [Sign up for our R-Tips Newsletter and get the code.](https://learn.business-science.io/r-tips-newsletter?el=website)
- [YouTube Tutorial](https://youtu.be/vQ6rU-SJonY)

# This Tutorial is Available in Video (9-minutes)

I have a 9-minute video that walks you through setting up `gt_summarytools()` in R and running your first exploratory data analysis with it. 👇

Introducing GT Summary Tools: Faster Data Analysis in R - YouTube

Tap to unmute

[Introducing GT Summary Tools: Faster Data Analysis in R](https://www.youtube.com/watch?v=vQ6rU-SJonY) [Matt Dancho (Business Science)](https://www.youtube.com/channel/UCqQ_cxcNu1ekqHXDc-MbU_w)

Matt Dancho (Business Science)29.7K subscribers

# Why Quick Data Analysis Matters

Exploratory Data Analysis is crucial for understanding your data, spotting trends, and detecting issues before diving into more advanced modeling techniques. But EDA can often be a time-consuming task if you’re not using the right tools.

That’s why I developed `gt_summarytools()` — to provide a faster, more efficient way to analyze your data using the power of `gt` and `summarytools`.

# Introducing gt_summarytools()

If you’ve used `summarytools` for generating quick summaries and gt for creating visually appealing tables, you’ll love this new function. `gt_summarytools()` combines the two, allowing you to get the best of both worlds: concise, visually-rich summaries that are easy to generate and interpret.

Here’s one of the summaries we will create today with `gt_summarytools()`:

## Combining the Best of gt and summarytools

Here’s how it works:

- `gt`: A package for creating publication-quality tables.

- `summarytools`: Known for its powerful `dfSummary()` function that provides a detailed overview of your data frame.

- `gt_summarytools()`: The perfect combination of the two, giving you a beautiful summary table with just a few lines of code.

Let’s dive into a demo!

# Code Demo: `gt_summarytools()` in Action

I’ve developed this function to help you summarize your data faster and with more visual appeal. Let’s take a look at the new code demo, exclusively for [R-tips newsletter](https://learn.business-science.io/r-tips-newsletter?el=website) subscribers.

[Get the Code (In the R-Tip 085 Folder)](https://learn.business-science.io/r-tips-newsletter?el=website)

## Step 1: Load Libraries and Data

Run this code to load the libraries and data:

## Step 2: Load the source code for `gt_summarytools()`

Next, source the code for the `gt_summarytools()` function ( [it’s in the R-Tip 085 Folder](https://learn.business-science.io/r-tips-newsletter?el=website)).

Run this code:

[Get the Code (In the R-Tip 085 Folder)](https://learn.business-science.io/r-tips-newsletter?el=website)

## Step 3: Run `gt_summarytools()` on the datasets provided

We can generate quick summaries using `gt_summarytools()`. Run this code:

[Get the Code (In the R-Tip 085 Folder)](https://learn.business-science.io/r-tips-newsletter?el=website)

Here, we’re using the `gt_summarytools()` function to generate a beautiful table summarizing the churn data and stock data. These tables are not only functional but visually appealing, thanks to the `gt_theme_538()` theme, which adds a clean, professional style.

Let’s examine the output:

### Customer Churn Summary:

### Stock Data Summary:

# Want the Full Code?

To get access to the full source code for `gt_summarytools()`, subscribe to the [R-Tips Newsletter](https://learn.business-science.io/r-tips-newsletter?el=website). This code is available exclusively to subscribers!

[Get the Code (In the R-Tip 085 Folder)](https://learn.business-science.io/r-tips-newsletter?el=website)

# Conclusion: Save Time and Analyze Faster

By leveraging `gt_summarytools()`, you can significantly speed up your data analysis workflow, all while generating better-looking tables. This function simplifies the process of data exploration, making it easier to gain insights and focus on decision-making and modeling.

**But there’s more to becoming a data scientist.**

If you would like to **grow your Business Data Science skills with R**, then please read on…

# Need to advance your business data science skills?

I’ve helped 6,107+ students learn data science for business from an elite business consultant’s perspective.

I’ve worked with Fortune 500 companies like S&P Global, Apple, MRM McCann, and more.

And I built a training program that gets my students life-changing data science careers (don’t believe me? [see my testimonials here](https://university.business-science.io/p/5-course-bundle-machine-learning-web-apps-time-series/)):

#### 6-Figure Data Science Job at CVS Health ($125K)       Senior VP Of Analytics At JP Morgan ($200K)       50%+ Raises & Promotions ($150K)       Lead Data Scientist at Northwestern Mutual ($175K)       2X-ed Salary (From $60K to $120K)       2 Competing ML Job Offers ($150K)       Promotion to Lead Data Scientist ($175K)       Data Scientist Job at Verizon ($125K+)       Data Scientist Job at CitiBank ($100K + Bonus)

# Whenever you are ready, here’s the system they are taking:

[Here’s the system](https://university.business-science.io/p/5-course-bundle-machine-learning-web-apps-time-series) that has gotten aspiring data scientists, career transitioners, and life long learners data science jobs and promotions…

[**Join My 5-Course R-Track Program Now!**\n\n(And Become The Data Scientist You Were Meant To Be...)](https://university.business-science.io/p/5-course-bundle-machine-learning-web-apps-time-series)

P.S. - Samantha landed her NEW Data Science R Developer job at CVS Health (Fortune 500). [This could be you.](https://university.business-science.io/p/5-course-bundle-machine-learning-web-apps-time-series)

# Become a 6-Figure Data Scientist

We've helped thousands of students become 6-figure data scientists.
