...

/

Handling TXT files

Handling TXT files

Let's get our hands dirty by taking input from .txt files

Input Data from a File

R is one of the most popular languages for data manipulation and analysis. We can perform various statistical analysis with this language. However, the size of the data that we are talking about here is in Gigabytes or Terabytes. Such a large quantity of data cannot be entered by the user interactively from the keyboard. Therefore, data is fed into the system/program using external files.

Here, we will be learning how to take input from .txt files. Now, suppose we have this data stored in a file.

The format of the .txt file is:

Alex, California, 2025550167, F
Brian, NewYork, 2025354137, M
Charles, Boston, 2025339164, M

Steps to Take Input from File

  1. We need to specify the file
...