3482
правки
Изменения
м
→Анализ суточной активности посетителей по дням недели
{{r-code|code=<nowiki>ga.data$dayOfWeekName <- factor(ga.data$dayOfWeekName, ordered = TRUE,
levels = c("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"))</nowiki>}}
{{r-code|code=<nowiki>> head(ga.data[order(ga.data$dayOfWeekName), ])
dayOfWeekName hour pageviews
25 Monday 00 4148
26 Monday 01 3576
27 Monday 02 3072
28 Monday 03 2320
29 Monday 04 1409
30 Monday 05 908</nowiki>}}
{{r-code|code=<nowiki>> qplot(data = ga.data, x = dayOfWeekName, y = hour, fill = pageviews, xlab = "days of week") +