R/cluster.graph.R

Defines functions cluster.graph

Documented in cluster.graph

cluster.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))
    names(b)[names(b)=="Freq"] <- "number of nodes"
    return(b)
  }

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.