Error when I try to change data type from character to numeric.

date_airline %>%
select(year,month,day) %>%
mutate_all(type.covert()) %>%
mutate_if(is.character,as.numeric)

It displays
Error in type.covert() : could not find function "type.covert"

I think mutate_all(type.covert()) %>% is redundant. I am not even sure type.covert() exists.
This should work

date_airline %>%
select(year,month,day) %>%
mutate_if(is.character,as.numeric)

Try: date_airline <- type_convert(date_airline) then date_airline %>% str()

date_airline$year <-as.numeric(date_airline$year)
date_airline$month<-as.numeric(date_airline$month)
date_airline$day<-as.numeric(date_airline$day)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.