[Stpp-commits] r28 - pkg/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Feb 12 16:12:49 CET 2010


Author: barryrowlingson
Date: 2010-02-12 16:12:49 +0100 (Fri, 12 Feb 2010)
New Revision: 28

Modified:
   pkg/man/rinfec.Rd
   pkg/man/rinter.Rd
   pkg/man/rlgcp.Rd
   pkg/man/rpcp.Rd
   pkg/man/rpp.Rd
Log:
fixing examples in docs

Modified: pkg/man/rinfec.Rd
===================================================================
--- pkg/man/rinfec.Rd	2010-02-12 14:47:25 UTC (rev 27)
+++ pkg/man/rinfec.Rd	2010-02-12 15:12:49 UTC (rev 28)
@@ -50,7 +50,7 @@
   \item{...}{additional parameters if \code{lambda} is a function.}
 }
 
-value{
+\value{
 A list containing:
 \item{xyt}{matrix (or list of matrices if \code{nsim}>1)
 containing the points (x,y,t) of the simulated point pattern.
@@ -70,7 +70,7 @@
 \examples{
 # inhibition; spatial distribution: uniform
 inf1 = rinfec(npoints=100, alpha=0.2, beta=0.6, gamma=0.5, maxrad=c(0.075,0.5), t.region=c(0,50), s.distr="uniform", t.distr="uniform", h="step", p="min", recent="all", inhibition=TRUE)
-animation(inf1$xyt, cex=0.8, runtime=10)
+\dontrun{animation(inf1$xyt, cex=0.8, runtime=10)}
 
 # contagion; spatial distribution: Poisson with intensity a given matrix
 data(fmd)
@@ -79,6 +79,10 @@
 h = h$h[which.min(h$mse)]
 Ls = kernel2d(as.points(fmd[,1:2]), northcumbria, h, nx=50, ny=50)
 inf2 = rinfec(npoints=100, alpha=4, beta=0.6, gamma=20, maxrad=c(12000,20), s.region=northcumbria, t.region=c(1,2000), s.distr="poisson", t.distr="uniform", h="step", p="min", recent=1, lambda=Ls$z, inhibition=FALSE)
+
+\dontrun{
 image(Ls$x, Ls$y, Ls$z, col=grey((1000:1)/1000)); polygon(northcumbria,lwd=2)
 animation(inf2$xyt, add=TRUE, cex=0.7, runtime=15)
 }
+
+}

Modified: pkg/man/rinter.Rd
===================================================================
--- pkg/man/rinter.Rd	2010-02-12 14:47:25 UTC (rev 27)
+++ pkg/man/rinter.Rd	2010-02-12 15:12:49 UTC (rev 28)
@@ -45,7 +45,7 @@
   generated. Otherwise, it is a contagious process. }
 }
 
-value{
+\value{
 A list containing:
 \item{xyt}{matrix (or list of matrices if \code{nsim}>1)
 containing the points (x,y,t) of the simulated point pattern.
@@ -65,7 +65,7 @@
 \examples{
 # simple inhibition process
 inh1 = rinter(npoints=200,thetas=0,deltas=0.05,thetat=0,deltat=0.001,inhibition=TRUE)
-stani(inh1$xyt)
+\dontrun{stani(inh1$xyt)}
 
 # inhibition process using hs and ht defined by the user
 hs = function(d,theta,delta,mus=0.1)
@@ -100,12 +100,16 @@
 legend("bottomright",col=1:2,lty=1,lwd=2,legend=c(expression(h[s]),expression(h[t])),bty="n",cex=2)
 
 inh2 = rinter(npoints=100, hs=hs, gs="min", thetas=0.2, deltas=0.1, ht=ht, gt="min",	 thetat=0.1, deltat=0.05, inhibition=TRUE)
-animation(inh2$xyt, runtime=15, cex=0.8)
+\dontrun{animation(inh2$xyt, runtime=15, cex=0.8)}
 
 # simple contagious process for given spatial and temporal regions
 data(northcumbria)
 cont1 = rinter(npoints=250, s.region=northcumbria, t.region=c(1,200), thetas=0,
  deltas=5000, thetat=0, deltat=10, recent=1, inhibition=FALSE)
-animation(cont1$xyt,  s.region=cont1$s.region, t.region=cont1$t.region,
+
+\dontrun{animation(cont1$xyt,  s.region=cont1$s.region, t.region=cont1$t.region,
  incident="darkgreen", prevalent="green3", runtime=15, cex=0.8)
-} 
+}
+}
+
+

Modified: pkg/man/rlgcp.Rd
===================================================================
--- pkg/man/rlgcp.Rd	2010-02-12 14:47:25 UTC (rev 27)
+++ pkg/man/rlgcp.Rd	2010-02-12 15:12:49 UTC (rev 28)
@@ -142,14 +142,21 @@
 # non separable covariance function: 
 lgcp1 <- rlgcp(npoints=200, nx=50, ny=50, nt=50, separable=FALSE, model="gneiting",
  param=c(1,1,1,1,1,2), var.grf=1, mean.grf=0)
-N <- lgcp1$Lambda[,,1];for(j in 2:(dim(lgcp1$Lambda)[3])){N <- N+lgcp1$Lambda[,,j]}
+N <- lgcp1$Lambda[,,1];for(j in 2:(dim(lgcp1$Lambda)[3])){N <-
+N+lgcp1$Lambda[,,j]}
+\dontrun{
 image(N,col=grey((1000:1)/1000));box()
 animation(lgcp1$xyt, cex=0.8, runtime=10, add=TRUE, prevalent="orange")
-
+}
 # separable covariance function: 
 lgcp2 <- rlgcp(npoints=200, nx=50, ny=50, nt=50, separable=TRUE, model="exponential",
  param=c(1,1,1,1,1,2), var.grf=2, mean.grf=-0.5*2)
-N <- lgcp2$Lambda[,,1];for(j in 2:(dim(lgcp2$Lambda)[3])){N <- N+lgcp2$Lambda[,,j]}
+N <- lgcp2$Lambda[,,1];for(j in 2:(dim(lgcp2$Lambda)[3])){N <-
+N+lgcp2$Lambda[,,j]}
+\dontrun{
 image(N,col=grey((1000:1)/1000));box()
-animation(lgcp2$xyt, cex=0.8, pch=20, runtime=10, add=TRUE, prevalent="orange")
+animation(lgcp2$xyt, cex=0.8, pch=20, runtime=10, add=TRUE,
+prevalent="orange")
 }
+
+}

Modified: pkg/man/rpcp.Rd
===================================================================
--- pkg/man/rpcp.Rd	2010-02-12 14:47:25 UTC (rev 27)
+++ pkg/man/rpcp.Rd	2010-02-12 15:12:49 UTC (rev 28)
@@ -74,11 +74,15 @@
 
 data(northcumbria)
 pcp1 <- rpcp(nparents=50, npoints=500, s.region=northcumbria, t.region=c(1,365),cluster=c("normal","exponential"), maxrad=c(5000,5))
+\dontrun{
 animation(pcp1$xyt, s.region=pcp1$s.region, t.region=pcp1$t.region,runtime=5)
-
+}
 # inhomogeneous Poisson distribution of parents
 
 lbda <- function(x,y,t,a){a*exp(-4*y) * exp(-2*t)}
 pcp2 <- rpcp(nparents=50, npoints=500, cluster="normal", lambda=lbda, a=4000/((1-exp(-4))*(1-exp(-2))))
+\dontrun{
 stani(pcp2$xyt)
 }
+
+}

Modified: pkg/man/rpp.Rd
===================================================================
--- pkg/man/rpp.Rd	2010-02-12 14:47:25 UTC (rev 27)
+++ pkg/man/rpp.Rd	2010-02-12 15:12:49 UTC (rev 28)
@@ -64,21 +64,23 @@
 # Homogeneous Poisson process
 # ---------------------------
 hpp1 <- rpp(lambda=200,replace=FALSE)
-stani(hpp1$xyt)
 
+\dontrun{stani(hpp1$xyt)}
+
 # fixed number of points, discrete time, with time repeat.
 data(northcumbria)
 hpp2 = rpp(npoints=500, s.region=northcumbria, t.region=c(1,1000), discrete.time=TRUE)
+\dontrun{
 polymap(northcumbria)
 animation(hpp2$xyt, s.region=hpp2$s.region, t.region=hpp2$t.region, runtime=10, add=TRUE)
-
+}
 # Inhomogeneous Poisson process
 # -----------------------------
 
 # intensity defined by a function
 lbda1 = function(x,y,t,a){a*exp(-4*y) * exp(-2*t)}
 ipp1 = rpp(lambda=lbda1, npoints=400, a=3200/((1-exp(-4))*(1-exp(-2))))
-stani(ipp1$xyt)
+\dontrun{stani(ipp1$xyt)}
 
 # intensity defined by a matrix
 data(fmd)
@@ -89,6 +91,8 @@
 Lt = dim(fmd)[1]*density(fmd[,3], n=200)$y
 ipp2 = rpp(lambda="m", Lambda=Ls$z, mut=Lt, s.region=northcumbria, 
 t.region=c(1,200), discrete.time=TRUE)
+\dontrun{
 image(Ls$x, Ls$y, Ls$z, col=grey((1000:1)/1000)); polygon(northcumbria)
 animation(ipp2$xyt, add=TRUE, cex=0.7, runtime=15)
 }
+}



More information about the Stpp-commits mailing list