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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.