I need to convert a field from a char file to something that is averagely calculable.
This is a field that refers to hours originally.
system.time(cpc_call<-fread("ACIONAMENTO_CALL.csv",header = T , sep= ";")) # Importa tabela
When I see the imported file it appears as chr.
Then in the attempt to convert, I made the code below:
cpc_call$Tempo_Falado = as.numeric(cpc_call$Tempo_Falado) # Transforma tempo falado em tempo
cpc_call %>%
group_by(Outcome) %>%
summarise(median(cpc_call$Tempo_Falado))
But the result of the column referring to the average returns only "NA"
Edit: Follow the output with: dput (head (cpc_call $ Time_Dial, 20))
> dput(head(cpc_call$Tempo_Falado, 20))
c("00:01:20", "00:01:46", "00:01:36", "00:05:26", "00:01:37",
"00:05:11", "00:02:34", "00:01:32", "00:01:44", "00:02:51", "00:02:45",
"00:01:45", "00:02:22", "00:02:04", "00:03:17", "00:01:59", "00:01:44",
"00:01:31", "00:01:23", "00:01:43")