Data frames - Importing data in R

Опубликовано: 13 Сентябрь 2024
на канале: 365 Data Science
2k
22

Download Our Free Data Science Career Guide:
Sign up for Our Complete Data Science Training with 57% OFF:

In this video we will learn how to import data into R, one of the most widely-used actions in R (read.table, read.delim).

The general-purpose data reading function in R is the read.data() function. To load data in the form of a text file from your working directory, pass the name of the file in quotes, and then specify at least the following: what the separator for your data is (so, how R is to know what distinguishes variables); does your data set have a header row or not; should R encode your string variables as factors.

Separators tell R how to look at your data and how to structure the data frame. The header signals whether the first row of the data file is values or variable names. If your data doesn’t have variable names and begins directly with the first observation, then set that argument to FALSE. Finally, the stringsAsFactorsv = argument tells R whether to convert all string variables to factors or not.

► Consider hitting the SUBSCRIBE button if you LIKE the content:

► VISIT our website:

Connect with us LinkedIn:

365 Data Science is an online educational career website that offers the incredible opportunity to find your way into the data science world no matter your previous knowledge and experience. We have prepared numerous courses that suit the needs of aspiring BI analysts, Data analysts and Data scientists.

We at 365 Data Science are committed educators who believe that curiosity should not be hindered by inability to access good learning resources. This is why we focus all our efforts on creating high-quality educational content which anyone can access online.

Check out our Data Science Career guides: