I have a dataset consisting of two columns. A datetime column and a column with numerical values. Its a simple dataset, so I did not attach it..
What I need to do, is to filter or subset the data corresponding with a class schedule, so that I get a dataset/dataframe with datetime values and numerical values for the time when the class has lectures only.
The class schedule is different from each day of the week, e.g. Mondays 8:00-9.50, 10.30-11.30, 14.50-15:50. Tuesdays 10.30-11.30, 14.10-15.30, Wednesdays...an so on.
Any idea how I could do this?
I usually convert datetime-values to POSIXct format, but recently I read about lubridate.
I am just still not sure how to efficiently subset with all these criteria.
Perhaps I should subset the data according to the weekdays first.
And then subset the different weekdays according to the lecture time...
Hope someone can help me.
BTW: The data is for all of 2014, so I actually have to avoid the data when the class have holidays as well...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…