# create fitness landscape as instance of FitLandDF object
a <- round(runif(64))
a <- array(a, dim = rep(4, 3))
my_landscape <- fitscape::FitLandDF(a)
# calculate co-occurrence matrix using:
# Manhattan distance of 1
# discretization into 2 equal-sized buckets
# normalization: multiply all elements so that sum of matrix equals unity
comat <- get_comatrix(my_landscape,
discrete = equal_discrete(2),
neighbor = manhattan(1))
# print co-occurrence matrix
print(comat)
Run the code above in your browser using DataLab