# Ratio funciont T/K, slightly different from clustering function
library(devtools)
load_all(".")
#############################################################################
## check Poisson
if(1){
d <- 3
set.seed(3)
rv <- seq(0.0, 0.3, length=40)
r3 <- function(n=100) list(coord=matrix(runif(d*n), ncol=d), bbox=matrix(rep(0:1,d),2))
one <- function(...) Rfun(x=r3(), r=rv)$R
df1 <- Rfun(r3(), r=rv)
vv <- sapply(1:100, one)
qq <- apply(vv, 1, quantile, prob=c(0.0, 0.5, 1), na.rm=T)
qq[2,] <- rowMeans(vv)
df1$R<-qq[2,]
par(mfrow=c(1,1))
plot(df1)
lines(rv, qq[1,], col=3)
lines(rv, qq[3,], col=3)
apply(vv, 2, lines, x=rv, col=rgb(0,0,0,0.1))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.