Here is the output for Activity. When I logged in it only had 2 observations so I went up to a previous line of code and ran it. Its back to mdy, character format. Id like to be able to add a weekday column next to it.
dput(head(activity2))
structure(list(Id = c(1503960366, 1503960366, 1503960366, 1503960366,
1503960366, 1503960366), ActivityDate = c("4/12/2016", "4/13/2016",
"4/14/2016", "4/15/2016", "4/16/2016", "4/17/2016"), TotalSteps = c(13162L,
10735L, 10460L, 9762L, 12669L, 9705L), TotalDistance = c(8.5,
6.96999979019165, 6.73999977111816, 6.28000020980835, 8.15999984741211,
6.48000001907349), VeryActiveDistance = c(1.87999999523163, 1.57000005245209,
2.44000005722046, 2.14000010490417, 2.71000003814697, 3.19000005722046
), ModeratelyActiveDistance = c(0.550000011920929, 0.689999997615814,
0.400000005960464, 1.25999999046326, 0.409999996423721, 0.779999971389771
), LightActiveDistance = c(6.05999994277954, 4.71000003814697,
3.91000008583069, 2.82999992370605, 5.03999996185303, 2.50999999046326
), SedentaryActiveDistance = c(0, 0, 0, 0, 0, 0), VeryActiveMinutes = c(25L,
21L, 30L, 29L, 36L, 38L), FairlyActiveMinutes = c(13L, 19L, 11L,
34L, 10L, 20L), LightlyActiveMinutes = c(328L, 217L, 181L, 209L,
221L, 164L), SedentaryMinutes = c(728L, 776L, 1218L, 726L, 773L,
539L), Calories = c(1985L, 1797L, 1776L, 1745L, 1863L, 1728L)), row.names = c(NA,
6L), class = "data.frame")
I am also needing too have a date column in sleep data frame too. I dont need the time and I will want to merge these two on ID and Date, if possible, with one column for weekday.Here is the output for dput(head(sleep))
> dput(head(sleep))
structure(list(Id = c(1503960366, 1503960366, 1503960366, 1503960366,
1503960366, 1503960366), SleepDay = c("4/12/2016 12:00:00 AM",
"4/13/2016 12:00:00 AM", "4/15/2016 12:00:00 AM", "4/16/2016 12:00:00 AM",
"4/17/2016 12:00:00 AM", "4/19/2016 12:00:00 AM"), TotalSleepRecords = c(1L,
2L, 1L, 2L, 1L, 1L), TotalMinutesAsleep = c(327L, 384L, 412L,
340L, 700L, 304L), TotalTimeInBed = c(346L, 407L, 442L, 367L,
712L, 320L)), row.names = c(NA, 6L), class = "data.frame")
Thanks for all the guidance!