Importing Data, Checking the Imported Data and Working With Data in R; Dataset: https://goo.gl/tJj5XG
More Statistics and R Programming Tutorials: https://goo.gl/4vDQzT
How to import a datasets into R , How to make sure data was imported correctly into R and How to begin to work with the imported data in R.
▶︎We will learn to use read.table function (which reads a file in table format and creates a data frame from it, with cases corresponding to lines and variables to fields in the file), and some of the arguments such as header argument and sep argument.
▶︎We will learn to use file.choose function to choose a file interactively
▶︎We will discuss how to use Menu options in RStudio to import data into R
▶︎and how to check the imported data to make sure it was imported correctly into R using the dim function to retrieve dimension of an object and let you know the number of rows and columns of the imported data, the head function in R (head() function), which returns the first or last parts of a vector, matrix, table, data frame and will let you see the first several rows of the data, the tail function in R (tail() function) to see the last several rows of the data in R, the double square brackets in R to subset data (brackets lets you select or subset data from a vector, matrix, array, list or data frame) , and the names function in R to get the names of an object in R.
▶︎▶︎ Download the dataset here:
▶︎Export Data from R (CSV , TXT and other formats): https://bit.ly/2PWS84w
▶︎Graphs and Descriptive Statistics in R: https://bit.ly/2PkTneg
▶︎Probability Distributions in R: https://bit.ly/2AT3wpI
▶︎Bivariate Analysis in R: https://bit.ly/2SXvcRi
▶︎Linear Regression in R: https://bit.ly/1iytAtm
▶︎Intro to Statistics Course: https://bit.ly/2SQOxDH
◼︎ Topics in the video:
0:00:07 How to read a dataset into R using read.table function and save it as an object
0:00:27 How to access the help menu in R
0:01:02 How to let R know that the first row of our data is headers by using header argument
0:01:14 How to let R know how the observations are separated by using sep argument
0:02:03 How to specify the path to the file using file.choose function
0:03:15 How to use Menu options in R Studio to import data into R
0:05:23 How to prepare the Excel data for importing into R
0:06:15 How to know the dimensions (the number of rows and columns) of the data in R using the dim function
0:06:35 How to see the first several rows of the data using the head command in R
0:06:45 How to see the last several rows of the data in R using the tail function
0:07:18 How to check if the data was read correctly into R using square brackets and subsetting data
0:08:21 How to check the variable names in R using the names function
This video is a tutorial for programming in R Statistical Software for beginners, using RStudio.
Content Creator: Mike Marin (B.Sc., MSc.) Senior Instructor at UBC.
Producer and Creative Manager: Ladan Hamadani (B.Sc., BA., MPH)
The #RTutorial is created by #marinstatslectures to support the statistics course (SPPH400 #IntroductoryStatistics) at The University of British Columbia(UBC) although we make all videos available to the everyone everywhere for free!
Thanks for watching! Have fun and remember that statistics is almost as beautiful as a unicorn!