Skip to content
Prev 239866 / 398500 Next

grouping question

Hello

I have what is probably a very simple grouping question however, given my
limited exposure to R, I have not found a solution yet despite my research
efforts and wild attempts at what I thought "might" produce some sort of
result.

I have a very simple list of integers that range between 1 and 24.  These
correspond to hours of the day.

I am trying to create a grouping of Day and Night with 
Day = 6 to 17.99
Night = 1 to 5.59  and  18 to 24

Using the Cut command I can create the segments but I have not found a
"combine" type of command to merger the two "night" segments.  No luck with
if/else either.

Any help would be greatly appreciated

Thank you

Will