3
我试图修改直方图的形状导致从“初始”大样品获得使用Initial = rbeta(1e5, 2, 3)
。具体而言,我想初始大样本的修改版本以具有2附加的较小(高度)“驼峰”(即,除了在初始大样品中存在的彼此2较小高度的峰) 。
编码问题:
我想知道如何操纵sample()
(也许使用其prob
参数)中的R基使得以这样的方式该命令的样品,这两个附加隆起约为“ .5"和。” 6"在X轴?
这是我的当前R代码:
Initial = rbeta(1e5, 2, 3) ## My initial Large Sample
hist (Initial) ## As seen, here there is only one "hump" say near
# less than ".4" on the X-Axis
Modified.Initial = sample(Initial, 1e4) ## This is meant to be the modified version of the
# the Initial with two additional "humps"
hist(Modified.Initial) ## Here, I need to see two additional "humps" near
# ".5" and ".6" on the X-Axis