2)Use the lackers data set in the package lubridate. In this data how many rows correspond to instances where the day was Monday and time 12?
I have tried this code but not getting output.
Your question seem to pertain to homework, so please read the Homework Policy.
You won't learn anything from being giving the answers, so please do show us what you have tried and then I'm sure people will be happy no nudge you in the right direction
You have some syntax errors
The "exactly equal to" operator is == not =
The "AND" operator (&) is no needed on dplyr syntax marital-status is a non-syntactic variable name so it has to be referenced among backticks like this `marital-status`
library(dplyr)
library(arules)
data("AdultUCI")
filter(AdultUCI, age == 38, `marital-status` == "Divorced")
#> age workclass fnlwgt education education-num marital-status
#> 1 38 Private 215646 HS-grad 9 Divorced
#> 2 38 Private 155222 Some-college 10 Divorced
#> 3 38 Private 179488 Some-college 10 Divorced
#> 4 38 Private 169469 HS-grad 9 Divorced
#> 5 38 Private 411797 Assoc-voc 11 Divorced
#> 6 38 Private 278924 Some-college 10 Divorced
#> occupation relationship race sex capital-gain capital-loss
#> 1 Handlers-cleaners Not-in-family White Male 0 0
#> 2 Machine-op-inspct Not-in-family Black Female 0 0
#> 3 Craft-repair Not-in-family White Male 0 1741
#> 4 Sales Not-in-family White Male 0 0
#> 5 Adm-clerical Unmarried White Female 0 0
#> 6 Craft-repair Not-in-family White Male 0 0
#> hours-per-week native-country income
#> 1 40 United-States small
#> 2 28 United-States small
#> 3 40 United-States small
#> 4 80 United-States small
#> 5 40 United-States small
#> 6 44 United-States small