How do I specify a sort order using a list?
You can do it "inline" with
perday[order(factor(perday$dayofweek,levels=c(c("Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun")))),]
which gives
dayofweek Attended nrow
3 Mon No 142
4 Mon Yes 174
11 Tue No 184
12 Tue Yes 214
13 Wed No 343
14 Wed Yes 255
9 Thu No 191
10 Thu Yes 192
1 Fri No 164
2 Fri Yes 131
5 Sat No 39
6 Sat Yes 26
7 Sun No 44
8 Sun Yes 39