출력 파일이 작업 디렉토리와 다른 디렉토리에 있도록 write() 및 write.table()을 사용할 수 있습니까? 파일 이름 앞에 출력 파일 경로를 설정하고 오류 메시지가 나타납니다.write.table to new directory
3
A
답변
0
물론 :
write.table(foo,file="../bar/baz.txt")
아니면 절대 경로를 사용할 수 있습니다 - 용어는 사용중인 운영 체제에 따라 달라집니다.
4
윈도우를 사용하는 경우 R
은 C:/
(처음에는 다른 마운트 된 드라이브 일 수도 있음)이 보이는 경우 현재 디렉토리 외부로 나가는 것을 알 수 있습니다. Mac의 경우 /
이 표시되면 현재 WD 외부로 이동합니다. 그래서 :
맥 OS X :
write.table(foo, file="https://stackoverflow.com/users/name/folder/filename.ext")
윈도우
write.table(foo, file="C:/users/name/folder/filename.ext")
항상 시험은 바로 첫 번째 경로를 확인하십시오! 당신이 /users/parent/subdir
에있어 당신이 parent
에서 뭔가를 참조 할 경우
list.files("C:/...")
list.files("/....") #Give errors if path doesn't exist as typed
그래서, 당신은 전체 경로를 입력해야합니다 - write.table(foo, "parent/name.ext")
을 파일 만들기 위해 R을 말할 것이다 : /users/parent/subdir/parent/name.ext
합니다.
관련 문제
- 1. write.table
- 2. New to
- 3. mod_rewrite server.com/directory to new.com/directorynew/directory
- 4. write.table 추가 열
- 5. Active Directory OU 트리 to jqTree
- 6. R에서 write.table 함수를 사용하는 방법?
- 7. C# to Java : T : new() 구문
- 8. 레일 2 (New to Rails) 도움
- 9. 레일즈 - AJAX to new/create 액션
- 10. Monkey patch __del__ to new function
- 11. 플렉스 ++ 문자 오류 등. new to flex
- 12. /directory/index.html을/directory/
- 13. R read.table <-> write.table R에서
- 14. Active Directory 공급자로서의 Active Directory?
- 15. Active Directory 인증
- 16. Active Directory 및 Active Directory LDS의 필드
- 17. git checkout delete directory
- 18. write.table()의 quote 인수는 큰 따옴표 만 사용할 수 있습니까? R의 <code>write.table()</code> 기능에
- 19. Active Directory
- 20. Active Directory LDAP
- 21. Active Directory. DACL 작업
- 22. Sharepoint-Active Directory 프로필
- 23. Active Directory Access
- 24. Active Directory 필터 memberof
- 25. SVN replicate directory
- 26. MSMQ와 Active Directory 통합
- 27. Excel에서 write.table 함수가있는 숫자 벡터의 값을 누락 R
- 28. Active Directory 인증
- 29. Active Directory 속성
- 30. C++ new/new [], 어떻게 메모리를 할당합니까?
'setwd()'를 시도하는 디렉토리가 존재하지 않는다는 오류 메시지가 표시 될 수 있습니까? 그렇다면'dir.create()'를 사용하십시오. –
시도해 본 실제'write.table' 행을 게시 할 수 있습니까? –
또한 Windows를 사용하는 경우 경로가 슬래시 'C :/Users/etc'를 사용해야 함을 잊지 마십시오. – C8H10N4O2