[R] About dpik function

chester123 chester123 at live.cn
Sun Jul 15 20:57:43 CEST 2012


Hi there and thanks in advance.

Nowadays I am working on the plug-in bandwidth selection with R. Firstly, my
1010 data is the return rate from Yahoo Finance.
Secondly, my code is following:
> r=read.table("/Users/user/Desktop/research/a.txt",sep=",",header=TRUE)
> x<-r[8:1010,]
> library(KernSmooth)
> dpik(x,scalest="minim",level=2L,kernel="normal",canonical=FALSE,gridsize=401L,range.x=range(x),truncate=TRUE)

But the error happens like this:
Error in Summary.factor(c(233L, 917L, 381L, 748L, 272L, 242L, 269L, 963L,  : 
  range not meaningful for factors

I don't know what's wrong and i am a rookie, please help with that. Thanks!


--
View this message in context: http://r.789695.n4.nabble.com/About-dpik-function-tp4636590.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list