1
我已成功安装descriptive statistics,并尝试使用所提供的方法(如差异等),它会一直拍摄未定义的方法“差异”。我认为这些方法是内置的,可以马上使用。在活动记录中使用描述性统计宝石
Scores_controller.rb
def index
statsD = User.all.extend(DescriptiveStatistics)
@var = Score.variance(&:strokes)
end
index.html.erb
Variance: <%= @var %>
我试图在统计应用到我满桌的分数。请帮忙。
什么是中风的数据类型? – MZaragoza
我刚刚创建了一个示例应用程序,使用描述性统计信息,你可以看看它https://github.com/mzaragoza/sample_descriptive_statistics我希望这有助于 – MZaragoza
@MZaragoza谢谢!那是铁轨吗?它看起来有点滑稽 – user2026178