Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
R Data Science Essentials

You're reading from  R Data Science Essentials

Product type Book
Published in Jan 2016
Publisher
ISBN-13 9781785286544
Pages 154 pages
Edition 1st Edition
Languages

Table of Contents (15) Chapters

R Data Science Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Getting Started with R Exploratory Data Analysis Pattern Discovery Segmentation Using Clustering Developing Regression Models Time Series Forecasting Recommendation Engine Communicating Data Analysis Index

The Titanic dataset


In this chapter, let's use the Titanic dataset, which is available on the Internet and also hosted on GitHub, to implement various techniques. Place the dataset in the current working directory in R; before this, first set the working directory accordingly using the setwd() command. The setwd() function is used to specify the location that should be considered as the current working directory. Now, read the data using the read.csv function and store it in a data frame. In this book, we have named the data frame tdata. The various details that are present in the dataset, which is hosted on GitHub, are as follows:

tdata<- read.csv("titanic.csv")
names(tdata)

The output of the preceding command is as follows:

These are the various columns captured in the dataset. The explanation of these variables is given. For more detailed understanding about the dataset, visit https://www.kaggle.com/c/titanic/data. We have used the file named train.csv for our learning purpose.

The variable...

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 $15.99/month. Cancel anytime}