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)
  }
FMestre1/MetaLandSim documentation built on Feb. 4, 2023, 5:46 p.m.