TRUE/FALSE question in X-Axis

Is it possible to write not FALSE and TRUE but weekdays and weekends in X-Axis ?

You can use ifelse or if_else function. Both of them basically works the same way, if_else is from dplyr package and the performance is a bit better. Anyway, you can do something like below.

 mutate(Weekend = if_else(CreationDate_wday  %in% c("Sun","Sat"),"Weekend","Weekday"))

I have updated your data here.

1 Like

Thanks! This is good advice for me. Can you share the data with your chart ?