首页 > 解决方案 > 按人计算的小时数

问题描述

您好,我可以将我的时间列导入为时间格式或 date_time 格式它返回 NA,我该如何处理,first_form 应该是时间格式,并且在预览中看起来像 last_form(当前是字符)? 在此处输入图像描述

Inmigrations <- read_excel("Inmigrations.xlsx", 
    col_types = c("skip", "skip", "skip", 
        "skip", "text", "date", "text", "text", 
        "numeric", "text", "numeric", "date"))

标签: rggplot2tidyversemosaic

解决方案


将其作为字符类型导入后尝试 lubridate:

library(lubridate)

df$first_form <- hms(df$first_form) 

推荐阅读