바탕 화면에 "windmillData"라는 txt 파일을 저장했습니다. 이것은 데이터가 txt 문서에서 어떻게 포맷되는지에 대한 스 니핏입니다. 데이터는 후보 사이트 "Cspd"(y 변수)의 풍속을 분석하고 참조 사이트 "Rspd"(x 변수)의 풍속을 비교합니다.내 텍스트 파일을 R
Date Cspd Rspd
"2002/1/1/0" 6.9 5.9666
"2002/1/1/6" 7.1 7.2176
"2002/1/1/12" 7.8 7.9405
"2002/1/1/18" 6.9 6.0174
"2002/1/2/0" 5.5 6.1646
"2002/1/2/6" 3.1 1.7687
"2002/1/2/12" 6.8 4.6471
"2002/1/2/18" 11.4 10.8734
"2002/1/3/0" 12.9 11.7198
"2002/1/3/6" 13.5 13.0118
"2002/1/3/12" 9.6 6.3998
"2002/1/3/18" 8.0 8.2706
"2002/1/4/0" 8.3 8.3522
"2002/1/4/6" 8.8 7.9027
"2002/1/4/12" 6.1 6.7136
"2002/1/4/18" 8.4 9.6341
"2002/1/5/0" 8.5 8.7918
"2002/1/5/6" 9.6 10.2506
"2002/1/5/12" 10.4 10.8894
"2002/1/5/18" 10.0 7.6393
"2002/1/6/0" 10.6 8.2217
"2002/1/6/6" 8.9 7.4820
"2002/1/6/12" 9.4 9.2628
"2002/1/6/18" 8.8 4.8476
"2002/1/7/0" 6.1 4.4194
"2002/1/7/6" 13.5 11.3922
"2002/1/7/12" 11.5 10.6574
"2002/1/7/18" 9.9 9.2053
"2002/1/8/0" 10.5 11.2537
"2002/1/8/6" 11.7 13.2537
"2002/1/8/12" 11.2 8.6108
R에로드 된 데이터를 가져 오려고했지만 작동하지 못하는 것 같습니다.
> read.table(file = "windmillData.txt", sep=",")
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'windmillData.txt': No such file or directory
> read.table(file = "windmillData.txt", sep="/t",header=TRUE)
Error in file(file, "rt") : cannot open the connection
In addition: Warning message:
In file(file, "rt") :
cannot open file 'windmillData.txt': No such file or directory
도움을 받으실 수 있습니다. 감사!
데이터를 작업 디렉토리 – DatamineR
에 넣어 'getwd()'를 반환하고 반환되는 내용을 확인해야합니다. 바탕 화면이 아니라면'setwd ("pathToDesktopHere")'를 실행하십시오. –