私のDataframe
電話copy1
:
copy1
Source: local data frame [4 x 4]
Groups: GM [2]
GM Avg.Start.Time Avg.Close.Time Avg.Last.Task.Duration
(fctr) (fctr) (fctr) (int)
1 ED 13:15 16:16 181
2 ED 16:12 17:44 92
3 LD 15:32 17:27 115
4 LD 14:38 17:11 153
Avg.Close.Time
Perを計算したいGM
私が試してみました:
copy1$Avg.Start.Time <-strptime(copy1$Avg.Start.Time, "%H:%M")
copy1%>%group_by(GM)%>%
summarise(mean(copy1$Avg.Start.Time,na.rm=T))
しかし、これを取得します:
Error: column 'Avg.Start.Time' has unsupported type : POSIXlt, POSIXt
私も使ってみましたlubridate
:
copy1$Avg.Start.Time <- hm(copy1$Avg.Start.Time)
mean(copy1$Avg.Start.Time,na.rm = T)
しかし、「0」を得る
Avg.Start.Time
Perをどのように計算できGM
ますか?