R根据自己的需要修改程序

时间:2013-08-05 02:50:03

标签: r

我正在使用gs包中提供的bnlearn函数。 dput(gs)在下面提供。

function (x, cluster = NULL, whitelist = NULL, blacklist = NULL, 
    test = NULL, alpha = 0.05, B = NULL, debug = FALSE, optimized = TRUE, 
    strict = FALSE, undirected = FALSE) 
{
    bnlearn(x = x, cluster = cluster, whitelist = whitelist, 
        blacklist = blacklist, test = test, alpha = alpha, B = B, 
        debug = debug, optimized = optimized, strict = strict, 
        undirected = undirected)
}

我想知道如何改变gs以适应我自己的需要。例如,我想将alpha值从0.05增加到0.15。

1 个答案:

答案 0 :(得分:4)

这些只是默认值,因此您可以在不指定其他参数的情况下调用gs(x)。 要修改alpha,只需执行以下操作:

gs(x, alpha=0.15)