开始使用免费开始使用

RailTrail sample data

The RailTrail data frame from the mosaic package is loaded in your workspace. RailTrail contains data collected by the Pioneer Valley Planning Commission on the usage of a local rail-trail. For each of 90 days, they recorded the rail-trail volume (number of users) and whether it was a weekday (TRUE if yes and FALSE otherwise). You will explore the trends in weekday vs weekend volume below.

本练习是课程的一部分

Bayesian Modeling with RJAGS

查看课程

练习说明

  • Confirm that weekday is recorded as a factor variable.
  • Construct density plots of weekday volume and weekend volume on the same frame.

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Confirm that weekday is a factor variable
class(___)

# Construct a density plot of volume by weekday
ggplot(___, aes(x = ___, fill = ___)) + 
    ___(alpha = 0.5)
编辑并运行代码