在r函数中操作数据框时出现此错误。代码如下所示:
daysMaintenance <- function(tid, make, component){
df <- read.csv(paste(sep="","normal/turbine_",tid,"_running.csv"),header=T)
check_date <- "2008-11-1"
df <- df[,c("Time_min")]
df <- df %>% mutate(Day = as.integer(Time_min/1445) + 1)
df <- df %>% group_by(Day) %>% summarise_at(vars(c(Time_min)), funs(max))
df <- df %>% mutate(Date = (as.Date(check_date) + df$Day - 1))
full.list = seq(from = as.Date(min(df$Date)), to = as.Date(max(df$Date)), by = 1)
diffs <- full.list[!full.list %in% df$Date]
diffs <- data.frame(diffs)
colnames(diffs) <- c("no_data_Date")
return (diffs)
}
为什么会出现此错误以及如何解决?预先谢谢你。