Using: selectByDate() function

Here Is a tibble from my dataframe

A tibble: 6 × 9

date Axis1 Axis2 Axis3 VM Standing Stepping Cycling

1 2022-05-… 0 0 0 0 0 0 0
2 2022-05-… 0 0 0 0 0 0 0
3 2022-05-… 0 0 0 0 0 0 0
4 2022-05-… 0 0 0 0 0 0 0
5 2022-05-… 0 0 0 0 0 0 0
6 2022-05-… 0 0 0 0 0 0 0

… with 1 more variable: New_Sitting

I'm trying to get all the weekdays from 7am-5pm, I've used this so far:

data2 <- selectByDate(data1, day="weekday", hour= 7:19)

But it is returning me:

Error in format.default(date, "%A") : invalid 'trim' argument

Note that My data frame is over the span of 1-2 weeks, but I'd like to cut off the nights and weekends since it does not pertain to my research needs.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.