全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
10201 2
2013-02-27
我的程序如下:

rt=read.csv("hppmi.csv")

y=rt[,1]

x=rt[,2]

library(np)

#package np, nonparametric andsemiparametric kernel methods

library(np)

h1=npregbw(formula=y~x); h1

fit1<-npreg(bws=h1,txdat=x,tydat=y)

plot(x,y)

points(x,y)


> h2=dpill(x,y); h2错误于if (from == to) rep.int(from, length.out) else as.vector(c(from,  :   需要TRUE/FALSE值的地方不可以用缺少值> fit2<-locpoly(x,y,bandwidth=h2)错误于if (from == to) rep.int(from, length.out) else as.vector(c(from,  :   需要TRUE/FALSE值的地方不可以用缺少值> plot(x,y)> lines(fit2)> #first order derivatives> order1<-locpoly(x,y,bandwidth=h2,drv=1)错误于if (from == to) rep.int(from, length.out) else as.vector(c(from,  :   需要TRUE/FALSE值的地方不可以用缺少值> plot(order1$x,order1$y,type='l')#first order derivativesorder1<-locpoly(x,y,bandwidth=h2,drv=1)plot(order1$x,order1$y,type='l')

程序中我并没有用到if语句,为什么出现错误呢???求教


二维码

扫码加我 拉你入群

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

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

全部回复
2014-12-19 16:49:19
这个是软件包里面的函数出错了
函数里面有if语句
二维码

扫码加我 拉你入群

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

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

2015-5-22 10:07:34
遇到同样的问题,请问如何解决的?谢谢
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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