1

待完善补充例子

library(readxl)
# library(readr)
library(lubridate) #日期处理
library(dplyr)
# library(stringr) #字符串处理
library(openxlsx) 

https://github.com/awalker89/openxlsx

b$Time时间 <- format(b$Time时间,"%H:%M")
[1] "04:47" "23:45" NA      "00:00"
as.POSIXct("2015/08/18 09:50")
[1] "2015-08-18 09:50:00 CST"

write a list of data.frames to individual worksheets using list names as worksheet names

l <- list("IRIS" = iris, "MTCARS" = mtcars)
write.xlsx(l, file = "writeXLSX2.xlsx")
write.xlsx(l, file = "writeXLSXTable2.xlsx", asTable = TRUE)

BruceZhaoR
80 声望6 粉丝

数据攻城狮


« 上一篇
File Manipulation