出版社:人民邮电出版社
出版日期:2013-3
ISBN:9787115303707
作者:(新加坡) Sau Sheong Chang
页数:224页
《R和Ruby数据分析之旅》的笔记-第73页 - 3.5
勘误
ggplot(data = df) + scale_shape_manual(name="Type", value=c(2,3,4)) +
应该为
ggplot(data = df) + scale_shape_manual(name="Type", values=c(2,3,4)) +
《R和Ruby数据分析之旅》的笔记-第69页 - 3.3
我觉得对于 图3.2 第一次模拟的结果,是不是我这个图更合适点呢?
当超过310人的时候,可以看出队列长度急剧上升。当只有一个卫生间的时候,人数和队列的关系
这个好像更真实点:
《R和Ruby数据分析之旅》的笔记-第65页 - 3.3
缺少常量DURATION定义;
添加:DURATION=540
《R和Ruby数据分析之旅》的笔记-第65页 - 3.3 初次模拟
模拟脚本1的代码片段:unless queue.empty?
restroom.enter queue.shift
end
应改为:until queue.empty?
restroom.enter queue.shift
end
《R和Ruby数据分析之旅》的笔记-第62页 - 3.2 表示卫生间等事物
勘误:def enter(person)
unoccupied_facility = @facilities.find {|f| not f.occupied?}
if unoccupied_facility
unoccupied_facility.occupy(person)
else
@queue << person
Person.population.delete person #<<加入此行
end
end
《R和Ruby数据分析之旅》的笔记-第75页 - 3.5
我第二次模拟的图3.5,可以看出来,设备超过12时,不用排队