Introduction to R: Factors

Channel:
Subscribers:
54,100
Published on ● Video Link: https://www.youtube.com/watch?v=gTI7qZd2ww4



Duration: 11:51
7,884 views
114


Factors in R are data structures that store categorical data. The default behavior for the the data frame constructor function and various data loading functions in R is to convert character data to factors. Various statistical, predictive modeling and graphic operations in R recognize factors as categorical data, but this automatic conversion is often undersirable, especially if you need to clean your data prior to analysis. To suppress this behavior, pass the extra argument "stringsAsFactors = FALSE" when constructing data frames or loading data with the standard read.csv() built in family of functions.

This is lesson 9 of a 30-part introduction to the R programming language for data analysis and predictive modeling. Link to the code notebook below:

Introduction to R: Data Frames https://www.kaggle.com/hamelg/intro-to-r-part-9-factors

This guide does not assume any prior exposure to R, programming or data science. It is intended for beginners with an interest in data science and those who might know other programming languages and would like to learn R.

I will create the videos for this guide such that you should be able to learn a lot just watching on YouTube, but to get the most out of the guide, it is recommended that you create a Kaggle account so that you can fork and edit each lesson so that you can follow along and run code yourself.

Follow DataDaft on social media for news and updates:
Twitter: https://twitter.com/DataDaft

Introduction to R Playlist:
https://www.youtube.com/playlist?list=PLiC1doDIe9rDjk9tSOIUZJU4s5NpEyYtE







Tags:
factors in r
r data typies
categorical data
categoricals in r
ordered factors r
dataframes in r
R data frames
r programming tutorial
r programming for beginners
introduction to R
intro to r
r basics
r programming
r tutorial
r programming language
getting started with r
r notebook tutorial
programming notebook
data science notebook
data science
data analysis