Session Ready
Exercise

Logic Rules

As seen in the video, logic always returns a single logical vector. The which() function returns the TRUE indices of a logical object.

The data frame businesshours is pre-loaded in the workspace.

Instructions
100 XP
  • Print a logical vector that indicates which elements of period from businesshours are equal to "bc".
  • Print the indices of period from businesshours which are equal to "ac".