全部版块 我的主页
论坛 提问 悬赏 求职 新闻 读书 功能一区 经管百科 爱问频道
916 0
2016-05-16
我不太理这串代码的意义,特别是switch分支结构

P_value<-function(cdf,x,paramet=numeric(0),side=0){

        n<-length(paramet)

        P<-switch(n+1,

        cdf(x),

        cdf(x,paramet),

        cdf(x,paramet[1],paramet[2]),

        cdf(x,paramet[1],paramet[2],paramet[3])

        )

        if(side<0)         P

        else if(side>0)  1-P

        else

        if(P<1/2)        2*P

        else             2*(1-P)

}

求解答


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群