A CSV(Comma Separated Values) Data Set is a file where the values in the file are separated by a comma. Let’s import the Data Set in R by using Rstudio and following the below steps:
2. Select Dataset Type: Click on the first option “From CSV” to import the data from a CSV File
3. Choose the File from Desktop: Click on Browse and choose the CSV file from your desktop location.
4. Import: Once the file is loaded properly, data is visible in the preview section. If the data looks good, click on the “Import” down below.
If the utils package is not already installed, then the RStudio installer will install the package first and then import the CSV data into R.
In the Import Section, there are some options to skip rows, trim spaces and so on which can be adjusted as per the requirement.
Once we click on the “Import” Button the data set is imported and can be visible in the Data Viewer Window. The data can be sorted or filtered here as we can do in an Excel file. It also shows the total number of records down below, on the left side.
I like to use RStudio for coding in R. It is convenient and easy to use. If you have not yet installed your RStudio, please follow the below post.
Installing RStudio on (Mac) OS X
Thank You for reading!