I have a dataset, df:
Action Date
Begin 3/16/2020 12:35:47 PM
End 3/16/2020 12:35:49 PM
Begin 3/16/2020 01:35:47 PM
End 3/16/2020 01:35:49 PM
Desired outcome:
Begin End
3/16/2020 12:35:47 PM 3/16/2020 12:35:49 PM
3/16/2020 01:35:47 PM 3/16/2020 01:35:49 PM
dput:
structure(list(Action = structure(c(1L, 2L, 1L, 2L), .Label = c("Begin",
"End"), class = "factor"), Date = structure(c(3L, 4L, 1L, 2L), .Label = c("3/16/2020 1:35:47 PM",
"3/16/2020 1:35:49 PM", "3/16/2020 12:35:47 PM", "3/16/2020 12:35:49 PM"
), class = "factor")), class = "data.frame", row.names = c(NA,
-4L))
What I have tried:
I think this is a permute type problem, but not exactly sure.
Permute(df, invertdf=FALSE)
Any suggestion is helpful.