여러 파일의 기능을 수행하고 난이 사용하고 있습니다 : 나는 단지 다음과 같은 메시지를받을 수 있나요 때, 그러나경고 메시지 사용하는 경우 경우() 내가 할 노력하고있어
require(readxl);
require(MESS);
final_df <- NULL;
for(i in CHI.Files){
PPeakD <- read_excel(paste0('/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/',i), sheet = "Ppeak");
PPeakD <- PPeakD[c(4,5)]
colnames(PPeakD)<-c("Time","PPeak")
PPeakD <- PPeakD[c(which(PPeak$PPeak>0)),]
PEEP <- read_excel(paste0("~/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/",i),
sheet = "PEEP")
PEEP <- PEEP[c(4,5)]
colnames(PEEP)<-c("Time","PEEP")
PEEP <- PEEP[c(which(PEEP$PEEP>0)),]
PPeakAdj <- CHI.Files.frame(approx(PPeak$Time, PPeak$PPeak,
xout = PEEP$Time, method = "linear", rule = 2))
colnames(PPeakAdj)<-c("Time","PPeakAdj")
DrivP <- CHI.Files.frame((PPeakAdj$Time),((c(PPeakAdj$PPeakAdj)) - (c(PEEP$PEEP))))
colnames(DrivP) <- c("Time", "DrivP")
final_df <- rbind(final_df,DrivP)
}
을 :
In addition: Warning messages:
1: In if (!file.exists(path)) { :
the condition has length > 1 and only the first element will be used
2: In if (!is_absolute_path(path)) paste0(" in current working directory ('", :
the condition has length > 1 and only the first element will be used
내가 뭘 잘못하고있어 조언을 찾고 계십니까?
감사
편집 : 현재 제공하기 위해 노력하고있다으로 아마
Error: '/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/013234-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/006538-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/000478-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/025396-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/045495-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/000443-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/020462-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
LungStudyOutput - Whole case/080677-1.xls/Users/andrewmclean/Dropbox/Research/Andrew/
In addition: Warning messages:
1: In if (!file.exists(path)) { :
the condition has length > 1 and only the first element will be used
2: In if (!is_absolute_path(path)) paste0(" in current working directory ('", :
the condition has length > 1 and only the first element will be used
'CHI.Files'에 무엇이 있는지는 알지 못하지만, 단지 하나의 값이 아닌 그것의 외양에 의해 알 수 있습니다. 루프를 주석 처리하고 루프를 수행하기 전에 단일 파일에 대해 작업 할 수 있는지 확인하십시오. 각 단계에서 변수의 내용을 확인하고 생각하는대로하십시오. –
예, 루프에서 작동하지 않았습니다. 나는 문제가 내 데이터가 '평평'되어서 너무 많은 데이터를 넣으려고했다는 것입니다. – andyroo