R/components.graph.R

Defines functions components.graph

Documented in components.graph

components.graph <-
function(rl)
  {
  if(!inherits(rl, "landscape"))
  #if (class(rl)!="landscape") 
  {
  stop(paste(rl, " should be an object of class class 'landscape'.", sep=""), call. = FALSE)
  }
    cluster <- as.vector (rl$nodes.characteristics)["cluster"]
    b <- as.data.frame(table(cluster))
    c1 <- nrow(b)
    return(c1)
  }

Try the MetaLandSim package in your browser

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

MetaLandSim documentation built on Jan. 13, 2023, 1:11 a.m.