R/out.cm.R

Defines functions out.cm

Documented in out.cm

# out.cm prints a community matrix or community effect matrix using the
# common format. It takes:
# M: a community matrix or community effect matrix

out.cm <- function(M) {
	
	N <- nrow(M)
	for (i in 1:N) {
		for (j in 1:N) {
			if (is.na(M[i,j])) {
				M[i,j] <- "?"
				}
			if (M[i,j] == 1) {
				M[i,j] <- "+"
				}
			if (M[i,j] == -1) {
				M[i,j] <- "-"
				}
			}
		}
	print(M,quote=FALSE)
	
	# end out.cm()
	}

Try the LoopAnalyst package in your browser

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

LoopAnalyst documentation built on Jan. 20, 2018, 9:16 a.m.