R
[R] 텍스트 파일 읽기
'김용환'
2015. 8. 21. 15:04
R에서 텍스트 파일 읽는 예제이다.
conn=file("json.txt",open="r")
line=readLines(conn)
for (i in 1:length(line)){
print(line[i])
}
close(conn)
RStudio에서 디버그를 위해서 다음과 같이 파일을 쉽게 볼 수 있다.
file.show("json.txt")
system("open json.txt")