tmp <- apply(ICHemophiliac, 1, mean)
h <- try(dpik(tmp), silent=T) # dpik() will work if KernSmooth is loaded
if (class(h) !="numeric" ) h <- .9 # this makes the example work
# if KernSmooth is not loaded
estimate <- ickde(ICHemophiliac, m=200, h=h)
plot(estimate, type="l")
Run the code above in your browser using DataLab