我想融化,dataframe
以便在一列中我有日期,然后我有用户名作为变量,最后是值。
我收到此错误:
as.Date.numeric(value) 中的错误:必须提供“原点”
虽然我理解错误,但我不确定如何解决它。
数据的一个小样本是:
structure(list(created_at = structure(c(14007, 14008, 14009,
14010, 14011, 14012), class = "Date"), benjamin = c(16, 0, 0,
0, 0, 0), byron = c(0, 0, 0, 0, 0, 0), cameronc = c(0, 0, 0,
0, 0, 0), daniel = c(0, 0, 0, 0, 0, 0), djdiaz = c(0, 0, 0, 0,
0, 0), gene = c(16, 77, 64, 38, 72, 36), joel = c(0, 0, 0, 0,
0, 2), kerem = c(0, 0, 0, 0, 0, 0), sophia = c(0, 0, 0, 0, 0,
0), SuperMoonMan = c(0, 0, 0, 0, 0, 0)), .Names = c("created_at",
"benjamin", "byron", "cameronc", "daniel", "djdiaz", "gene",
"joel", "kerem", "sophia", "SuperMoonMan"), row.names = c(NA,
6L), class = c("cast_df", "data.frame"))
谢谢你的帮助。