r - 按人计算的小时数
问题描述
您好,我可以将我的时间列导入为时间格式或 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"))
解决方案
将其作为字符类型导入后尝试 lubridate:
library(lubridate)
df$first_form <- hms(df$first_form)
推荐阅读
- java - 如何在 RecyclerView 中选择单个项目?
- google-sheets - 根据左侧单元格的条件对单元格求和
- android - Open fragment from another one in kotlin
- c# - How to redirect after certain path ASP.NET MVC 5
- python - 如何从外部判断一个进程有多少个 python 线程?
- flutter - 在颤振中调用函数时出现字符串子类型错误
- flutter - 错误:使用带有布尔值的 BLoC_pattern 时出现“错误状态:无元素”
- jquery - 导出到 Word of Confluence 内容会丢失 CSS 样式
- python - 以下代码中的 for 循环有什么作用?
- python - pymc3中带有loc参数的二项分布