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!