In this chapter, we focus on file processing, i.e., processing files for given purposes, which can be considered as data processing. Specifically, we write and analyze programs to investigate and modify files. As opposed to many other problems in computer science, file processing is usually very dependent on the syntax of the programming language.
Nevertheless, some common strategies need to be
... [Show full abstract] developed to investigate, process, and modify files. Some languages, such as R, provide many higher-level functions that can easily be used to perform complex input/output operations, whereas others may need more programmer efforts. In this chapter, we attack some basic problems, whose solutions can easily be performed using different programming languages. In general, we consider files that contain numbers or some texts that are investigated, processed, and modified. We also consider programs with multiple input and output files, whose contents need to be processed quickly for efficient programming.