R/ipsimlist.R

Defines functions ipsimlist

Documented in ipsimlist

 ipsimlist<- function(pp, mimark,listsim){
   # inhomogeneous simulation of a type within a
   # multivariate point pattern
   # listsim: list with simulated pp from simulador2

   listsim <- lapply(listsim, function(x, pp2=pp, mimark2=mimark)   {
                    # First split the multivariate pp
                     u <- split(pp2)
	             # Second, put the fit inhomogenous  simulated IPP
                      u[[mimark2]] <- unmark(x)
	         # recompose back the splited as a multivariate pp
                 split(pp2) <- u
                 return(pp2)
                 }
	        )
   return(listsim)
 }
 
 
 
 
 

Try the idar package in your browser

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

idar documentation built on Jan. 5, 2023, 5:10 p.m.