vignettes/leloc.R

leloc <- function(x,n=1,p=1,q=1,xoff=-20, yoff=-10){
 s <- getSpline(x$edges[[n]],p)@cPoints
 xs <- rep(NA,length(s))
 ys <- rep(NA,length(s))
 for (i in 1:length(s))
  {
  xs[i] <- s[[i]]@x
  ys[i] <- s[[i]]@y
  }
 list(x=mean(xs)+xoff, y=mean(ys)+yoff)
}

Try the RBGL package in your browser

Any scripts or data that you put into this service are public.

RBGL documentation built on Nov. 8, 2020, 5 p.m.