Simple solution provide by Prof. Ripley is to modify the relevant code as follows (he posted in the R-development group):
SDh <- function(x, h, n, d) .C(stats:::R_band_phi4_bin, as.integer(n), as.integer(length(x)), as.double(d), x, as.double(h), u = double(1))$u TDh <- function(x, h, n, d) .C(stats:::R_band_phi6_bin, as.integer(n), as.integer(length(x)), as.double(d), x, as.double(h), u = double(1))$u Z <- .C(stats:::R_band_den_bin, as.integer(n), as.integer(nb), d = double(1), x, cnt = integer(nb)) It works great with minimum extra effort. Thanks. ______________________________________________ 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.