Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Tableau

You're reading from   Mastering Tableau Smart Business Intelligence techniques to get maximum insights from your data

Arrow left icon
Product type Paperback
Published in Dec 2016
Publisher Packt
ISBN-13 9781784397692
Length 476 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jen Stirrup Jen Stirrup
Author Profile Icon Jen Stirrup
Jen Stirrup
David Baldwin David Baldwin
Author Profile Icon David Baldwin
David Baldwin
Arrow right icon
View More author details
Toc

Table of Contents (14) Chapters Close

Preface 1. Getting Up to Speed – a Review of the Basics FREE CHAPTER 2. All about Data – Getting Your Data Ready 3. All about Data – Joins, Blends, and Data Structures 4. All about Data – Data Densification, Cubes, and Big Data 5. Table Calculations 6. Level of Detail Calculations 7. Beyond the Basic Chart Types 8. Mapping 9. Tableau for Presentations 10. Visualization Best Practices and Dashboard Design 11. Improving Performance 12. Interacting with Tableau Server 13. R Integration

Troubleshooting

The interaction between Tableau and R can be challenging to negotiate. You may experience numerous problems that at first seem difficult to understand. These problems, however, usually stem from a few underlying causes. This section will address some of those underlying causes.

Give R what it expects

It's important to make sure that the variables you pass to an R argument line up with what R is expecting. Consider the following example based on code from Exercise - correlation:

SCRIPT_REAL("cor(.arg1, .arg2)", SUM([Sales]), SUM([Profit]))   

Initial code from Exercise 2

script_real("cor(.arg1)", SUM([Sales]), SUM([Profit]))   

Adjusted code from Exercise 2. Note that cor now only receives one variable.

Error in cor(.arg1): supply both 'x' and 'y' or a matrix-like 'x'   

The adjusted code throws this error.

It's certainly no surprise that R would throw an error in this case. The cor function requires...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime