Рет қаралды 12,271
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 www.kaggle.com...
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 KZbin, 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: / datadaft
Introduction to R Playlist:
• Introduction to R