Я хотел бы прочитать текстовый файл в R, строка за строкой, используя цикл for и длину файла. Проблема в том, что он печатает только символ (0). Это код:
fileName="up_down.txt"
con=file(fileName,open="r")
line=readLines(con)
long=length(line)
for (i in 1:long){
linn=readLines(con,1)
print(linn)
}
close(con)