[Stpp-commits] r47 - pkg/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Apr 20 14:26:40 CEST 2012


Author: gabriele
Date: 2012-04-20 14:26:37 +0200 (Fri, 20 Apr 2012)
New Revision: 47

Modified:
   pkg/R/rinfec.r
   pkg/R/rinter.r
   pkg/R/rlgcp.r
   pkg/R/rpcp.r
   pkg/R/rpp.r
Log:


Modified: pkg/R/rinfec.r
===================================================================
--- pkg/R/rinfec.r	2012-04-19 16:55:40 UTC (rev 46)
+++ pkg/R/rinfec.r	2012-04-20 12:26:37 UTC (rev 47)
@@ -21,7 +21,7 @@
           ny <- dim(lambda)[2]
           Lambda <- lambda
         }
-      s.grid <- make.grid(nx,ny,s.region)
+      s.grid <- .make.grid(nx,ny,s.region)
       s.grid$mask <- matrix(as.logical(s.grid$mask),nx,ny)
       if (is.function(lambda))
         {
@@ -139,7 +139,7 @@
       pattern.interm <- cbind(x=xy[1],y=xy[2],t=t0)
       Mu <- rep(0,nt)
       ti <- t0
-      ITK <- iplace(t.grid$times,ti,t.grid$tinc)
+      ITK <- .iplace(t.grid$times,ti,t.grid$tinc)
       
       continue <- FALSE
       while(continue==FALSE)
@@ -173,7 +173,7 @@
                 }
               else
                 {
-                  itk <- iplace(t.grid$times,tk,t.grid$tinc)
+                  itk <- .iplace(t.grid$times,tk,t.grid$tinc)
 
                  if ((mu[itk]==0) || ((h=="gaussian") && (mu[itk]<ug)))
                    {
@@ -224,8 +224,8 @@
                                          xp <- xy[1]
                                          yp <- xy[2]
                                          up <- runif(1)
-                                         nix <- iplace(X=s.grid$x,x=xp,xinc=s.grid$xinc)
-                                         niy <- iplace(X=s.grid$y,x=yp,xinc=s.grid$yinc)
+                                         nix <- .iplace(X=s.grid$x,x=xp,xinc=s.grid$xinc)
+                                         niy <- .iplace(X=s.grid$y,x=yp,xinc=s.grid$yinc)
                                          Up <- Lambda[nix,niy]/lmax
                                          retain <- up <= Up
                                          if ((retain==FALSE) || is.na(retain))

Modified: pkg/R/rinter.r
===================================================================
--- pkg/R/rinter.r	2012-04-19 16:55:40 UTC (rev 46)
+++ pkg/R/rinter.r	2012-04-20 12:26:37 UTC (rev 47)
@@ -1,4 +1,4 @@
-spatial.inhibition <- function(npoints,h,theta,delta,p,recent="all",s.region,inhibition=TRUE,...)
+.spatial.inhibition <- function(npoints,h,theta,delta,p,recent="all",s.region,inhibition=TRUE,...)
   {
   if (missing(s.region)) s.region <- matrix(c(0,0,1,1,0,1,1,0),ncol=2)
 
@@ -135,7 +135,7 @@
 }
 
 
-temporal.inhibition <- function(npoints,h,theta,delta,p,recent="all",t.region,discrete.time=FALSE,replace=FALSE,inhibition=TRUE)
+.temporal.inhibition <- function(npoints,h,theta,delta,p,recent="all",t.region,discrete.time=FALSE,replace=FALSE,inhibition=TRUE)
   {  
   if (missing(t.region)) t.region <- c(0,1)
 
@@ -307,8 +307,8 @@
   ni <- 1
   while(ni<=nsim)
     {
-      pattern.interm <- spatial.inhibition(npoints,h=hs,theta=thetas,delta=deltas,p=gs,recent=recent,s.region=s.region,inhibition=inhibition,...)$pts
-      times.interm <- temporal.inhibition(npoints,h=ht,theta=thetat,delta=deltat,p=gt,recent=recent,t.region=t.region,inhibition=inhibition,discrete.time=discrete.time,replace=replace,...)$times
+      pattern.interm <- .spatial.inhibition(npoints,h=hs,theta=thetas,delta=deltas,p=gs,recent=recent,s.region=s.region,inhibition=inhibition,...)$pts
+      times.interm <- .temporal.inhibition(npoints,h=ht,theta=thetat,delta=deltat,p=gt,recent=recent,t.region=t.region,inhibition=inhibition,discrete.time=discrete.time,replace=replace,...)$times
       
       if (nsim==1)
         {

Modified: pkg/R/rlgcp.r
===================================================================
--- pkg/R/rlgcp.r	2012-04-19 16:55:40 UTC (rev 46)
+++ pkg/R/rlgcp.r	2012-04-20 12:26:37 UTC (rev 47)
@@ -1,9 +1,195 @@
-gauss3D <- function(nx=100,ny=100,nt=100,xlim,ylim,tlim,separable=TRUE,model="exponential",param=c(1,1,1,1,1,2),scale=c(1,1),var.grf=1,mean.grf=0,exact=TRUE)
+.set.cov <- function(separable,model,param,sigma2)
+  {
+    mods <- 0
+    modt <- 0
+    mod <- 0    
+
+    models <- c("exponential","cauchy","stable","wave","gneiting","cesare","matern","none")
+
+    for(i in 1:length(model))
+      {
+        M <- which(models==model[i])
+        if (length(M)==0) stop("the model is not implemented")
+      }
+
+    for (i in 1:length(unique(model)))
+      {
+        if (((isTRUE(separable)) & ((model[i]==models[5]) | (model[i]==models[6]))) | ((!(isTRUE(separable))) & ((model[i]==models[1]) | (model[i]==models[2]) | (model[i]==models[3]) | (model[i]==models[4]) | (model[i]==models[7])))) stop("'stcov' does not match with 'model'")
+      }
+
+    if (isTRUE(separable))
+      {
+        if ((length(model)!=1) & (length(model)!=2))
+          stop("for separable covariance functions, 'model' must be of length 1 or 2")
+        if (length(model)==1)
+          {
+            if (model=="none")
+              {
+                mods <- 0
+                modt <- 0
+              }
+            if (model=="exponential")
+              {
+                mods <- 1
+                modt <- 1
+              }
+            if (model=="stable")
+              {
+                mods <- 2
+                if ((param[1] >2) | (param[1]<0)) stop("Stable model parameter must lie in [0,2]")
+                modt <- 2
+                if ((param[2] >2) | (param[2]<0)) stop("Stable model parameter must lie in [0,2]")
+              }
+            if (model=="cauchy")
+              {
+                mods <- 3
+                if (param[1]<=0) stop("Cauchy model parameter must be strictly positive")
+                modt <- 3
+                if (param[2]<=0) stop("Cauchy model parameter must be strictly positive")
+              }
+            if (model=="wave")
+              {
+                mods <- 4
+                modt <- 4
+                }
+            if (model=="matern") 
+			{
+                  mods <- 7
+			if (param[2]<=0 | param[1]<=0) stop("Matern model parameters must be strictly positive")
+                  modt <- 7
+			if (param[3]<=0 | param[4]<=0) stop("Matern model parameters must be strictly positive")
+                  }
+          }
+            if (length(model)==2)
+              {
+                if (model[1]=="none")
+                    mods <- 0
+                if (model[2]=="none")
+                  modt <- 0
+                if (model[1]=="exponential")
+                    mods <- 1
+                if (model[2]=="exponential")
+                  modt <- 1
+                if (model[1]=="stable")
+                    {
+                      mods <- 2
+                      if ((param[1] >2) | (param[1]<0)) stop("Stable model parameter must lie in [0,2]")
+                    }
+                if (model[2]=="stable")
+                  {
+                    modt <- 2
+                    if ((param[2] >2) | (param[2]<0)) stop("Stable model parameter must lie in [0,2]")
+                  }
+                if (model[1]=="cauchy")
+                  {
+                    mods <- 3
+                    if (param[1]<=0) stop("Cauchy model parmaeter must be strictly positive")
+                  }
+                if (model[2]=="cauchy")
+                  {
+                    modt <- 3
+                    if (param[2]<=0) stop("Cauchy model parameter must be strictly positive")
+                  }
+                if (model[1]=="wave")
+                    mods <- 4
+                if (model[2]=="wave")
+                  modt <- 4
+                if (model[1]=="matern")
+			{
+                  mods <- 7
+			if (param[2]<=0 | param[1]<=0) stop("Matern model parameters must be strictly positive")
+                  }
+		    if (model[2]=="matern")
+			{
+                  modt <- 7
+			if (param[3]<=0 | param[4]<=0) stop("Matern model parameters must be strictly positive")
+                  }
+              }
+      }
+    if (!(isTRUE(separable)))
+      {
+        if (length(model)!=1)
+          stop("for non-separable covariance functions, 'model' must be of length 1")
+        if (model=="gneiting")
+          {
+            mod <- 5
+            if (param[6]<2) stop("for Gneiting's covariance function, the sixth parameter must be greater than 2")
+            if ((param[3]<=0) | (param[3]>2)) stop("for Gneiting's covariance function, the third parameter must lie in (0,2]")
+            if ((param[4]<=0) | (param[4]>1)) stop("for Gneiting's covariance function, the fourth parameter must lie in (0,1]")
+            if ((param[5]!=1) & (param[5]!=2) & (param[5]!=3)) stop("for Gneiting's covariance function, the fifth parameter must be 1, 2 or 3")
+            if ((param[2]!=1) & (param[2]!=2) & (param[2]!=3)) stop("for Gneiting's covariance function, the second parameter must be 1, 2 or 3")
+            if ((param[2]==1) & ((param[1]<0) | (param[1]>2))) stop("for Gneiting's covariance function, if the second parameter equals 1, the first parameter must lie in [0,2]") 
+            if ((param[2]==2) & (param[1]<=0)) stop("for Gneiting's covariance function, if the second parameter equals 2, the first parameter must be strictly positive")            
+          }
+        if (model=="cesare")
+          {
+            mod <- 6
+            if (((param[1]>2) | (param[1]<1)) | ((param[2]>2) | (param[2]<1))) stop("for De Cesare's model, the first and second parameters must lie in [1,2]")
+            if (param[3]<3/2) stop("for De Cesare's model, the third parameter must be greater than 3/2")
+          }
+      }
+
+    return(model=c(mods,modt,mod))
+  }
+
+.matern = function (d, scale = 1, alpha = 1, nu = 0.5) 
 {
+    if (any(d < 0)) 
+        stop("distance argument must be nonnegative")
+    d <- d * alpha
+    d[d == 0] <- 1e-10
+    k <- 1/((2^(nu - 1)) * gamma(nu))
+    res <- scale * k * (d^nu) * besselK(d, nu)
+    return(res)
+}
 
+
+.covst <- function(dist,times,separable=TRUE,model,param=c(1,1,1,1,1,2),sigma2=1,scale=c(1,1),plot=TRUE,nlevels=10)
+{
+
+  nt <- length(times)
+  np <- length(dist)
+
+  model <- .set.cov(separable,model,param,sigma2)
+  
+  gs <- array(0, dim = c(np,nt))
+  storage.mode(gs) <- "double"
+
+  gs <- .Fortran("covst",
+                 (gs),
+                 as.double(dist),
+                 as.integer(np),
+                 as.double(times),
+                 as.integer(nt),
+                 as.integer(model),
+                 as.double(param),
+                 as.double(sigma2),
+                 as.double(scale))[[1]]
+ if (model[1]==7) mods=.matern(dist,scale=scale[1],alpha=param[2],nu=param[1])
+ if (model[2]==7) modt=.matern(times,scale=scale[2],alpha=param[4],nu=param[3])
+ if (model[1]==7 & model[2]==7) gs=mods%*%t(modt)
+ if (model[1]==7 & model[2]!=7) gs=mods*gs
+ if (model[2]==7 & model[1]!=7) gs=gs*modt
+
+
+  if (plot==TRUE)
+    {
+#      image(dist,times,gs,col=grey(((10*max(length(times),length(dist))):1)/(10*max(length(times),length(dist)))),xlab="h",ylab="t",cex.axis=1.5,cex.lab=2,font=2)
+      image(dist,times,gs,col=grey((1000:1)/1000),xlab="h",ylab="t",cex.axis=1.5,cex.lab=2,font=2)
+      contour(dist,times,gs,add=T,col=4,labcex=1.5,nlevels=nlevels)
+    }
+  
+  return(gs)
+
+}
+
+
+.gauss3D <- function(nx=100,ny=100,nt=100,xlim,ylim,tlim,separable=TRUE,model="exponential",param=c(1,1,1,1,1,2),scale=c(1,1),var.grf=1,mean.grf=0,exact=TRUE)
+{
+
   N <- c(nx,ny,nt)
 
-  mod <- set.cov(separable,model,param,var.grf)
+  mod <- .set.cov(separable,model,param,var.grf)
   
   g <- floor(log(2*(N-1))/log(2))+1
   M <- 2^g
@@ -96,7 +282,7 @@
   Lambdafin <- list()
   ni <- 1
 
-  s.grid <- make.grid(nx,ny,s.region)
+  s.grid <- .make.grid(nx,ny,s.region)
   s.grid$mask <- matrix(as.logical(s.grid$mask),nx,ny)
 
   if (discrete.time==TRUE)
@@ -119,7 +305,7 @@
 
   while(ni<=nsim)
     {
-      S <- gauss3D(nx=nx,ny=ny,nt=nt,xlim=range(s.region[,1]),ylim=range(s.region[,2]),tlim=range(t.region),separable=separable,model=model,param=param,scale=scale,var.grf=var.grf,mean.grf=mean.grf,exact=exact)
+      S <- .gauss3D(nx=nx,ny=ny,nt=nt,xlim=range(s.region[,1]),ylim=range(s.region[,2]),tlim=range(t.region),separable=separable,model=model,param=param,scale=scale,var.grf=var.grf,mean.grf=mean.grf,exact=exact)
 
       Lambda <- exp(S)
 
@@ -165,9 +351,9 @@
           prob <- NULL
           for(ix in 1:length(x))
             {
-              nix <- iplace(X=s.grid$x,x=x[ix],xinc=s.grid$xinc)
-              niy <- iplace(X=s.grid$y,x=y[ix],xinc=s.grid$yinc)
-              nit <- iplace(X=t.grid$times,x=times[ix],xinc=t.grid$tinc)
+              nix <- .iplace(X=s.grid$x,x=x[ix],xinc=s.grid$xinc)
+              niy <- .iplace(X=s.grid$y,x=y[ix],xinc=s.grid$yinc)
+              nit <- .iplace(X=t.grid$times,x=times[ix],xinc=t.grid$tinc)
               prob <- c(prob,Lambda[nix,niy,nit]/lambdamax)
             }
           
@@ -218,9 +404,9 @@
           prob <- NULL
           for(ix in 1:length(wx))
             {
-              nix <- iplace(X=s.grid$x,x=wx[ix],xinc=s.grid$xinc)
-              niy <- iplace(X=s.grid$y,x=wy[ix],xinc=s.grid$yinc)
-              nit <- iplace(X=t.grid$times,x=wtimes[ix],xinc=t.grid$tinc)
+              nix <- .iplace(X=s.grid$x,x=wx[ix],xinc=s.grid$xinc)
+              niy <- .iplace(X=s.grid$y,x=wy[ix],xinc=s.grid$yinc)
+              nit <- .iplace(X=t.grid$times,x=wtimes[ix],xinc=t.grid$tinc)
               prob <- c(prob,Lambda[nix,niy,nit]/lambdamax)
             }
           M <- which(is.na(prob))

Modified: pkg/R/rpcp.r
===================================================================
--- pkg/R/rpcp.r	2012-04-19 16:55:40 UTC (rev 46)
+++ pkg/R/rpcp.r	2012-04-20 12:26:37 UTC (rev 47)
@@ -1,7 +1,7 @@
-itexp <- function(u, m, t) { -log(1-u*(1-exp(-t*m)))/m }
-rtexp <- function(n, m, t) { itexp(runif(n), m, t) }
+.itexp <- function(u, m, t) { -log(1-u*(1-exp(-t*m)))/m }
+.rtexp <- function(n, m, t) { .itexp(runif(n), m, t) }
 
-pcp.larger.region <- function(s.region, t.region, nparents=NULL, npoints=NULL, lambda=NULL, mc=NULL, nsim=1, cluster="uniform", dispersion, infecD=TRUE, larger.region, tronc=1, ...)
+.pcp.larger.region <- function(s.region, t.region, nparents=NULL, npoints=NULL, lambda=NULL, mc=NULL, nsim=1, cluster="uniform", dispersion, infecD=TRUE, larger.region, tronc=1, ...)
 {
   if (missing(cluster)) cluster <- "uniform"
   
@@ -129,9 +129,9 @@
       if (t.distr=="trunc.exponential")
         {
           if (infecD==TRUE) 
-            zp <- zpar+rtexp(nc,m=1/dispersiont,t=tronc)
+            zp <- zpar+.rtexp(nc,m=1/dispersiont,t=tronc)
           else
-            zp <- zpar+sample(c(-1,1),1)*rtexp(nc,m=1/dispersiont,t=tronc)
+            zp <- zpar+sample(c(-1,1),1)*.rtexp(nc,m=1/dispersiont,t=tronc)
         }
 
       mask <- ((inout(as.points(x=xp,y=yp),poly=s.region)==T) & (zp > t.region[1] & zp < t.region[2]) & (sqrt( (((xpar-xp)^2)/dispersions^2) + (((ypar-yp)^2)/dispersions^2)) < 1))
@@ -192,9 +192,9 @@
       if (t.distr=="trunc.exponential")
         {
           if (infecD==TRUE) 
-            zp <- zpar+rtexp(1,m=1/dispersiont,t=tronc)
+            zp <- zpar+.rtexp(1,m=1/dispersiont,t=tronc)
           else
-            zp <- zpar+sample(c(-1,1),1)*rtexp(1,m=1/dispersiont,t=tronc)
+            zp <- zpar+sample(c(-1,1),1)*.rtexp(1,m=1/dispersiont,t=tronc)
         }
       
       if ((inout(as.points(x=xp,y=yp),poly=s.region)==T) & (zp > t.region[1] & zp < t.region[2]) & (sqrt( (((xpar-xp)^2)/dispersions^2) + (((ypar-yp)^2)/dispersions^2)) < 1))
@@ -246,10 +246,10 @@
   while(ni<=nsim)
     {
       if (edge=="larger.region")
-        pattern.interm <- pcp.larger.region(s.region=s.region, t.region=t.region, nparents=nparents, npoints=npoints, lambda=lambda, mc=mc, cluster=cluster, dispersion=dispersion, infecD=infectious, larger.region=larger.region,tronc=tronc, ...)$pts
+        pattern.interm <- .pcp.larger.region(s.region=s.region, t.region=t.region, nparents=nparents, npoints=npoints, lambda=lambda, mc=mc, cluster=cluster, dispersion=dispersion, infecD=infectious, larger.region=larger.region,tronc=tronc, ...)$pts
 
       if (edge=="without")
-        pattern.interm <- pcp.larger.region(s.region=s.region, t.region=t.region, nparents=nparents, npoints=npoints, lambda=lambda, mc=mc, cluster=cluster, dispersion=dispersion, infecD=infectious, larger.region=c(0,0), tronc=tronc, ...)$pts
+        pattern.interm <- .pcp.larger.region(s.region=s.region, t.region=t.region, nparents=nparents, npoints=npoints, lambda=lambda, mc=mc, cluster=cluster, dispersion=dispersion, infecD=infectious, larger.region=c(0,0), tronc=tronc, ...)$pts
 
       if (nsim==1)
         pattern <- as.3dpoints(pattern.interm)

Modified: pkg/R/rpp.r
===================================================================
--- pkg/R/rpp.r	2012-04-19 16:55:40 UTC (rev 46)
+++ pkg/R/rpp.r	2012-04-20 12:26:37 UTC (rev 47)
@@ -1,4 +1,4 @@
-make.grid <- function(nx,ny,poly)
+.make.grid <- function(nx,ny,poly)
   {
     if (missing(poly)) poly <- matrix(c(0,0,1,0,1,1,0,1),4,2,T)
     
@@ -47,7 +47,7 @@
     invisible(return(list(x=xgrid,y=ygrid,X=xx,Y=yy,pts=pts,xinc=xinc,yinc=yinc,mask=matrix(as.logical(mask),nx,ny))))
   }
 
-rhpp <- function(lambda, s.region, t.region, npoints=NULL, replace=TRUE, discrete.time=FALSE)
+.rhpp <- function(lambda, s.region, t.region, npoints=NULL, replace=TRUE, discrete.time=FALSE)
   {
     if (missing(s.region)) s.region <- matrix(c(0,0,1,1,0,1,1,0),ncol=2)
     if (missing(t.region)) t.region <- c(0,1)
@@ -108,7 +108,7 @@
   }
 
 
-iplace <- function(X,x,xinc)
+.iplace <- function(X,x,xinc)
   {
     n <- length(X)
     i <- 0
@@ -123,7 +123,7 @@
   }
 
 
-ripp <- function(lambda, s.region, t.region, npoints=NULL, replace=TRUE, discrete.time=FALSE, nx=100, ny=100, nt=100, lmax=NULL, Lambda=NULL, ...)
+.ripp <- function(lambda, s.region, t.region, npoints=NULL, replace=TRUE, discrete.time=FALSE, nx=100, ny=100, nt=100, lmax=NULL, Lambda=NULL, ...)
 {
   if (missing(s.region)) s.region <- matrix(c(0,0,1,1,0,1,1,0),ncol=2)
   if (missing(t.region)) t.region <- c(0,1)
@@ -144,7 +144,7 @@
 
   if (is.function(lambda))
     {
-      s.grid <- make.grid(nx,ny,s.region)
+      s.grid <- .make.grid(nx,ny,s.region)
       s.grid$mask <- matrix(as.logical(s.grid$mask),nx,ny)
       if (discrete.time==TRUE)
         {
@@ -262,7 +262,7 @@
       ny <- dim(Lambda)[2]
       nt <- dim(Lambda)[3]
       
-      s.grid <- make.grid(nx,ny,s.region)
+      s.grid <- .make.grid(nx,ny,s.region)
       s.grid$mask <- matrix(as.logical(s.grid$mask),nx,ny)
 
       if (discrete.time==TRUE)
@@ -316,9 +316,9 @@
           prob <- NULL
           for(nx in 1:length(x))
             {
-              nix <- iplace(X=s.grid$x,x=x[nx],xinc=s.grid$xinc)
-              niy <- iplace(X=s.grid$y,x=y[nx],xinc=s.grid$yinc)
-              nit <- iplace(X=t.grid$times,x=times[nx],xinc=t.grid$tinc)
+              nix <- .iplace(X=s.grid$x,x=x[nx],xinc=s.grid$xinc)
+              niy <- .iplace(X=s.grid$y,x=y[nx],xinc=s.grid$yinc)
+              nit <- .iplace(X=t.grid$times,x=times[nx],xinc=t.grid$tinc)
               prob <- c(prob,Lambda[nix,niy,nit]/lambdamax)
             }
           
@@ -382,9 +382,9 @@
           prob <- NULL
           for(nx in 1:length(wx))
             {
-              nix <- iplace(X=s.grid$x,x=wx[nx],xinc=s.grid$xinc)
-              niy <- iplace(X=s.grid$y,x=wy[nx],xinc=s.grid$yinc)
-              nit <- iplace(X=t.grid$times,x=wtimes[nx],xinc=t.grid$tinc)
+              nix <- .iplace(X=s.grid$x,x=wx[nx],xinc=s.grid$xinc)
+              niy <- .iplace(X=s.grid$y,x=wy[nx],xinc=s.grid$yinc)
+              nit <- .iplace(X=t.grid$times,x=wtimes[nx],xinc=t.grid$tinc)
               prob <- c(prob,(Lambda[nix,niy,nit])/lambdamax)
             }
           M <- which(is.na(prob))
@@ -447,7 +447,7 @@
     {
       while(ni<=nsim)
         {
-          hpp <- rhpp(lambda=lambda, s.region=s.region, t.region=t.region, npoints=npoints, replace=replace, discrete.time=discrete.time)
+          hpp <- .rhpp(lambda=lambda, s.region=s.region, t.region=t.region, npoints=npoints, replace=replace, discrete.time=discrete.time)
           if (nsim==1)
             {
               pattern <- as.3dpoints(hpp$pts)
@@ -469,7 +469,7 @@
 
   if (is.function(lambda))
     {
-      s.grid <- make.grid(nx,ny,s.region)
+      s.grid <- .make.grid(nx,ny,s.region)
       s.grid$mask <- matrix(as.logical(s.grid$mask),nx,ny)
       if (discrete.time==TRUE)
         {
@@ -500,7 +500,7 @@
           
       while(ni<=nsim)
         {
-          ipp <- ripp(lambda=lambda, s.region=s.region, t.region=t.region, npoints=npoints, replace=replace, discrete.time=discrete.time, nx=nx, ny=ny, nt=nt, lmax=lmax, Lambda=Lambda, ...)
+          ipp <- .ripp(lambda=lambda, s.region=s.region, t.region=t.region, npoints=npoints, replace=replace, discrete.time=discrete.time, nx=nx, ny=ny, nt=nt, lmax=lmax, Lambda=Lambda, ...)
           
           if (nsim==1)
             {
@@ -520,7 +520,7 @@
     {
       while(ni<=nsim)
         {
-          ipp <- ripp(lambda=lambda, s.region=s.region, t.region=t.region, npoints=npoints, replace=replace, discrete.time=discrete.time, nx=nx, ny=ny, nt=nt, lmax=lmax, Lambda=Lambda, ...)
+          ipp <- .ripp(lambda=lambda, s.region=s.region, t.region=t.region, npoints=npoints, replace=replace, discrete.time=discrete.time, nx=nx, ny=ny, nt=nt, lmax=lmax, Lambda=Lambda, ...)
           
           if (nsim==1)
             {



More information about the Stpp-commits mailing list