Judit -
Does this example provide any insight?
pop <- matrix(0,7,7)# Population matrix when t==0
pop[sample(1:length(pop),1)] <-1 #Population matrix when t==1
which(pop!=0,arr.ind=TRUE)
row col
[1,] 3 4
- Phil Spector
Dear all of you,
I would like if someone can help me to know how I can read a matrix looking for
positions in the matrix that are not null.
I have a matrix with most of the "cells" or "positions" null, I am trying to
know the invasion power of a plant (number 1 in the matrix when t==1).
I would
2 matches
Mail list logo