I do not know if it is possible to change a specific line in a stream file (search in a file), although you have the opportunity to read the file, change the column and write the frame to the file, the read, write functions provide you with what you need.
You can also use read.table() to read a file in a table format, modify a specific line, and then write.table()
you have options like read.csv() and write.csv() and many other options like readLines() .
EDIT
Here is a wiki link for processing files in R
source share