How do you load a .txt file into r?
To load a .txt file in R, at first, the file should be present in the working directory where you are keeping your projects.
To do that, type
setwd(<pathname in quotation mark>)
getwd() #to check whether you have given right path
Now, its time to place the .txt file in that working directory and then type
my_data <- read.delim("text_file.txt")
that's it !!
Hope this answer has helped you. If you have some queries regarding this, do let me know in the comment section.
Hit like if the answer really helped you.
Thanks !!
Get Answers For Free
Most questions answered within 1 hours.