markcrosscorr(X, r = NULL, correction = c("isotropic", "Ripley", "translate"), method = "density", ..., normalise = TRUE, Xname = NULL)"ppp" or something acceptable to
    as.ppp. 
  "isotropic", "Ripley", "translate",
    "translation", "none" or "best".
    It specifies the edge correction(s) to be applied.
    Alternatively correction="all" selects all options.
  "density", 
    "loess",
    "sm" and "smrep".
  normalise=FALSE,
    compute only the numerator of the expression for the
    mark correlation.
  X.
  "fasp") containing
  the mark cross-correlation functions for each possible pair
  of columns of marks.
  Next, each pair of columns is considered, and the mark
  cross-correlation is defined as
  $$
    k_{mm}(r) = \frac{E_{0u}[M_i(0) M_j(u)]}{E[M_i,M_j]}
  $$
  where $E[0u]$ denotes the conditional expectation
  given that there are points of the process at the locations
  $0$ and $u$ separated by a distance $r$.
  On the numerator,
  $M(i,0)$ and $M(j,u)$
  are the marks attached to locations $0$ and $u$ respectively
  in the $i$th and $j$th columns of marks respectively.
  On the denominator, $Mi$ and $Mj$ are
  independent random values drawn from the
  $i$th and $j$th columns of marks, respectively,
  and $E$ is the usual expectation.
  
  Note that $k[mm](r)$ is not a ``correlation''
  in the usual statistical sense. It can take any 
  nonnegative real value. The value 1 suggests ``lack of correlation'':
  if the marks attached to the points of X are independent
  and identically distributed, then
  $k[mm](r) =  1$.
  The argument X must be a point pattern (object of class
  "ppp") or any data that are acceptable to as.ppp.
  It must be a marked point pattern.
  The cross-correlations are estimated in the same manner as
  for markcorr.
markcorr
  # The dataset 'betacells' has two columns of marks:
  #       'type' (factor)
  #       'area' (numeric)
  if(interactive()) plot(betacells)
  plot(markcrosscorr(betacells))
Run the code above in your browser using DataLab