How to Load Data set in R
Loading data into R software
{`To load data into R use >variable name <- read.table(“filename”) `}
For example:
{`>hills <-read.table(“hills.txt”)`}
![Loading data into R software Loading data into R software](https://www.assignmenthelp.net/webimg/yah/images/loading-data-into-r-software.png)
How to Load a .csv file in R
{`To load a file with .csv extension in R >variable name <- read.csv(“filename”) `}
For example:
{`>hills <-read.csv(“tables.csv”)`}
![How to Load a .csv file in R How to Load a .csv file in R](https://www.assignmenthelp.net/webimg/yah/images/how-to-load-a-csv-file-in-r.png)
NOTE:
Always ensure that the file you want to load is saved in your current working directory.