2013-06-13 2 views
0

여기 제가 시도한 코드가 있습니다. 기본적으로 나는 허가 된 부분에 대해 궁금해하고 있습니다.R에서 CSV로 내보낼 때 권한이 거부되었습니다

data <- matrix(c(1,2,3,4), ncol=2) 
write.csv(data,"C:/Users/brian_000/Documents") 

오류 :이 파일처럼 당신이 그것에 쓸 수 있도록

Error in file(file, ifelse(append, "a", "w")) : 
    cannot open the connection 
In addition: Warning message: 
In file(file, ifelse(append, "a", "w")) : 
    cannot open file 'C:/Users/brian_000/Documents': Permission denied 
    write.csv(data, file="C:/Users/brian_000/Documents") 
    Error in file(file, ifelse(append, "a", "w")) : 
cannot open the connection 
In addition: Warning message: 
In file(file, ifelse(append, "a", "w")) : 
    cannot open file 'C:/Users/brian_000/Documents': Permission denied 

답변

9

C:/Users/brian_000/Documents은 (아마도) 디렉토리입니다. 대신 C:/Users/brian_000/Documents/myfile.csv과 같은 파일에 쓰십시오.

관련 문제