#### A Proper Example ####
x <- c( 1, 1.5, 2, 3, 4.2, 5.0, 6.1, 5.3, 4.5, 0.9, 2.1, 4.3)
d <- c( 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1)
f1 <-function(x) { x - 3.7}
f2 <- function(x) {x^2 - 16.5 }
g <- list(f1, f2)
re = kmc.clean(x, d)
p = length(g)
n = length(re$kmc.time)
gmat<-matrix(0, p, n);
for(i in 1:p){
gmat[i,] = g[[i]](re$kmc.time)
}
# You may want to require(Rcpp) on some platforms (such Mac OSX-ARM)
# library(Rcpp)
# check_G_mat(gmat)
Run the code above in your browser using DataLab