I have a column "Start time" that has both date and time in it, I would like to separate (and save into different .csv files) all the data that is before noon and after noon.
> dput(head(DQ))
structure(list(ID = 1:6, Date = c("2022-02-15", "2022-02-25",
"2022-02-25", "2022-02-28", "2022-03-01", "2022-03-01"), Start.time = c("2-15-22 11:15:43",
"2-25-22 8:52:33", "2-25-22 8:55:08", "2-28-22 23:19:36", "3-1-22 8:58:31",
"3-1-22 21:04:49"), Completion.time = c("2-15-22 11:16:59", "2-25-22 8:55:02",
"2-25-22 16:16:37", "2-28-22 23:21:52", "3-1-22 9:00:02", "3-1-22 21:06:31"
), Email = c("anonymous", "anonymous", "anonymous", "anonymous",
"anonymous", "anonymous"), Name = c(NA, NA, NA, NA, NA, NA),
Total.points = c(NA, NA, NA, NA, NA, NA), Quiz.feedback = c(NA,
NA, NA, NA, NA, NA), Participant.Code = c("AE1_04", "AE1_02",
"AE1_02", "AE1_02", "AE1_02", "AE1_02"), Points...Participant.Code...Code.du.participant...Code.de.la.participante = c(NA,
NA, NA, NA, NA, NA), Feedback...Participant.Code...Code.du.participant...Code.de.la.participante = c(NA,
NA, NA, NA, NA, NA), Stiffness...Raideur = c(10L, 3L, 2L,
6L, 7L, 6L), Points...Stiffness...Raideur = c(NA, NA, NA,
NA, NA, NA), Feedback...Stiffness...Raideur = c(NA, NA, NA,
NA, NA, NA), Fatigue...Fatigue = c(10L, 6L, 4L, 6L, 7L, 5L
), Points...Fatigue...Fatigue = c(NA, NA, NA, NA, NA, NA),
Feedback...Fatigue...Fatigue = c(NA, NA, NA, NA, NA, NA),
Discomfort...Inconfort = c(7L, 7L, 5L, 6L, 7L, 7L), Points...Discomfort...Inconfort = c(NA,
NA, NA, NA, NA, NA), Feedback...Discomfort...Inconfort = c(NA,
NA, NA, NA, NA, NA), Happiness...Joie = c(1L, 8L, 7L, 8L,
7L, 8L), Points...Happiness...Joie = c(NA, NA, NA, NA, NA,
NA), Feedback...Happiness...Joie = c(NA, NA, NA, NA, NA,
NA), Productivity...Productivité = c(10L, 6L, 7L, 8L, 5L,
8L), Points...Productivity...Productivité = c(NA, NA, NA,
NA, NA, NA), Feedback...Productivity...Productivité = c(NA,
NA, NA, NA, NA, NA), Ability.to.concentrate...Capacité.de.se.concentrer = c(7L,
8L, 6L, 8L, 6L, 8L), Points...Ability.to.concentrate...Capacité.de.se.concentrer = c(NA,
NA, NA, NA, NA, NA), Feedback...Ability.to.concentrate...Capacité.de.se.concentrer = c(NA,
NA, NA, NA, NA, NA), Alertness...Vigilance = c(7L, 5L, 4L,
8L, 6L, 7L), Points...Alertness...Vigilance = c(NA, NA, NA,
NA, NA, NA), Feedback...Alertness...Vigilance = c(NA, NA,
NA, NA, NA, NA), Stress...Stress = c(10L, 9L, 7L, 8L, 7L,
7L), Points...Stress...Stress = c(NA, NA, NA, NA, NA, NA),
Feedback...Stress...Stress = c(NA, NA, NA, NA, NA, NA), Back.Pain...Mal.de.dos = c(9L,
6L, 6L, 7L, 7L, 7L), Points...Back.Pain...Mal.de.dos = c(NA,
NA, NA, NA, NA, NA), Feedback...Back.Pain...Mal.de.dos = c(NA,
NA, NA, NA, NA, NA), Neck.Pain...Douleur.au.cou = c(9L, 4L,
3L, 6L, 4L, 5L), Points...Neck.Pain...Douleur.au.cou = c(NA,
NA, NA, NA, NA, NA), Feedback...Neck.Pain...Douleur.au.cou = c(NA,
NA, NA, NA, NA, NA), Head.Pain...Mal.de.tête = c(7L, 1L,
1L, 2L, 1L, 1L), Points...Head.Pain...Mal.de.tête = c(NA,
NA, NA, NA, NA, NA), Feedback...Head.Pain...Mal.de.tête = c(NA,
NA, NA, NA, NA, NA), Eye.Pain...Douleur.oculaire = c(10L,
8L, 1L, 1L, 1L, 1L), Points...Eye.Pain...Douleur.oculaire = c(NA,
NA, NA, NA, NA, NA), Feedback...Eye.Pain...Douleur.oculaire = c(NA,
NA, NA, NA, NA, NA), In.the.past.24.hours..have.you.done.any.light.physical.activity...Au.cours.des.dernières.24.heures..avez.vous.fait.une.activité.physique.légère. = c("No / Non",
"No / Non", "Yes / Oui", "No / Non", "Yes / Oui", "Yes / Oui"
), Points...In.the.past.24.hours..have.you.done.any.light.physical.activity...Au.cours.des.dernières.24.heures..avez.vous.fait.une.activité.physique.légère. = c(NA,
NA, NA, NA, NA, NA), Feedback...In.the.past.24.hours..have.you.done.any.light.physical.activity...Au.cours.des.dernières.24.heures..avez.vous.fait.une.activité.physique.légère. = c(NA,
NA, NA, NA, NA, NA), If.yes..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps. = c("",
"", "brisk 10 min walk", "", "stretching", "Stretching"),
Points...If.yes..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps. = c(NA,
NA, NA, NA, NA, NA), Feedback...If.yes..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps. = c(NA,
NA, NA, NA, NA, NA), In.the.past.24.hours..have.you.done.any.moderate.physical.activity...Au.cours.des.dernières.24.heures..avez.vous.fait.une.activité.physique.modérée. = c("No / Non",
"Yes / Oui", "No / Non", "Yes / Oui", "No / Non", "No / Non"
), Points...In.the.past.24.hours..have.you.done.any.moderate.physical.activity...Au.cours.des.dernières.24.heures..avez.vous.fait.une.activité.physique.modérée. = c(NA,
NA, NA, NA, NA, NA), Feedback...In.the.past.24.hours..have.you.done.any.moderate.physical.activity...Au.cours.des.dernières.24.heures..avez.vous.fait.une.activité.physique.modérée. = c(NA,
NA, NA, NA, NA, NA), If.yes..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps.2 = c("",
"30 min walk at lunch", "", "Magasiner et un petit strength training et cardio",
"", ""), Points...If.yes..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps.2 = c(NA,
NA, NA, NA, NA, NA), Feedback...If.yes..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps.2 = c(NA,
NA, NA, NA, NA, NA), In.the.past.24.hours..have.you.done.any.vigorous.physical.activity.....Au.cours.des.dernières.24.heures..avez.vous.pratiqué.une.activité.physique.intense. = c("No / Non",
"No / Non", "No / Non", "No / Non", "No / Non", "No / Non"
), Points...In.the.past.24.hours..have.you.done.any.vigorous.physical.activity.....Au.cours.des.dernières.24.heures..avez.vous.pratiqué.une.activité.physique.intense. = c(NA,
NA, NA, NA, NA, NA), Feedback...In.the.past.24.hours..have.you.done.any.vigorous.physical.activity.....Au.cours.des.dernières.24.heures..avez.vous.pratiqué.une.activité.physique.intense. = c(NA,
NA, NA, NA, NA, NA), If.so..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps. = c("",
"", "", "", "", ""), Points...If.so..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps. = c(NA,
NA, NA, NA, NA, NA), Feedback...If.so..what.did.you.do.and.for.how.long....Si.oui..qu.avez.vous.fait.et.pendant.combien.de.temps. = c(NA,
NA, NA, NA, NA, NA), Please.add.any.additional.comments.you.have...Veuillez.ajouter.tout.commentaire.supplémentaire.que.vous.avez. = c(NA,
NA, NA, NA, NA, NA), Points...Please.add.any.additional.comments.you.have...Veuillez.ajouter.tout.commentaire.supplémentaire.que.vous.avez. = c(NA,
NA, NA, NA, NA, NA), Feedback...Please.add.any.additional.comments.you.have...Veuillez.ajouter.tout.commentaire.supplémentaire.que.vous.avez. = c(NA,
NA, NA, NA, NA, NA)), row.names = c(NA, 6L), class = "data.frame")
I'm open to different ways of doing this, either sorting/filtering all of the morning and afternoons OR adding a column that states if it is morning and afternoon OR having it sorted and filtered in R and then having it saved to separate .csv files
please let me know if you need more details