Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R Data Mining

You're reading from  R Data Mining

Product type Book
Published in Nov 2017
Publisher Packt
ISBN-13 9781787124462
Pages 442 pages
Edition 1st Edition
Languages
Concepts

Table of Contents (22) Chapters

Title Page
Credits
About the Author
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
1. Why to Choose R for Your Data Mining and Where to Start 2. A First Primer on Data Mining Analysing Your Bank Account Data 3. The Data Mining Process - CRISP-DM Methodology 4. Keeping the House Clean – The Data Mining Architecture 5. How to Address a Data Mining Problem – Data Cleaning and Validation 6. Looking into Your Data Eyes – Exploratory Data Analysis 7. Our First Guess – a Linear Regression 8. A Gentle Introduction to Model Performance Evaluation 9. Don't Give up – Power up Your Regression Including Multiple Variables 10. A Different Outlook to Problems with Classification Models 11. The Final Clash – Random Forests and Ensemble Learning 12. Looking for the Culprit – Text Data Mining with R 13. Sharing Your Stories with Your Stakeholders through R Markdown 14. Epilogue
15. Dealing with Dates, Relative Paths and Functions

Working directories and relative paths in R


R gives the possibility to the reader to set the so called working directory, which is analogous to the current directory, typical of  command-line tools. This working directory has to be intended as the folder where we are going to store the greatest part, if not all the files,. needed for our current analysis. Technically this will result in a different behavior from the interpreter when facing a file path.

To understand how this works, we can try the following experiment, starting from our desktop let us create a subfolder, named analysis_directory so that the path of this directory from the desktop will look as follows:

/Desktop/analysis_directory

We now place a new text file into the subfolder analysis_directory, namely experiment.csv. Finally, we go to the R console and request to the console to show the current the working directory, as follows: getwd().

This results in the console printing out the absolute path leading to the current working...

lock icon The rest of the chapter is locked
arrow left Previous Chapter
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 $15.99/month. Cancel anytime}