knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of feasoverlap is to compute the overlap between two feasibility domains.
You can install the development version of feasoverlap from GitHub with:
# install.packages("devtools") devtools::install_github("clsong/feasoverlap")
library(feasoverlap) # generate two random interaction matrices set.seed(1) A <- interaction_matrix_random(num = 4, stren = 0.4, conne = 1) set.seed(2) B <- interaction_matrix_random(num = 4, stren = 0.4, conne = 1) calculate_omega(A) # relative size of interaction matrix calculate_omega_overlap(A, A) # overlap between the same matrix calculate_omega(B) # relative size of interaction matrix calculate_omega_overlap(B, B) # overlap between the same matrix calculate_omega_overlap(A, B) # overlap of two interaction matrices calculate_omega_overlap(B, A) # overlap of two interaction matrices
library(feasoverlap) set.seed(4) A <- interaction_matrix_random(3, 0.4, 1) #generate a random interaction matrix C1 <- diag(c(-1,-1,-1), 3) #imposing a biological constraint. Here it refers to that the growth rates of all species have to be positive C2 <- diag(c(1,-1,1), 3) #imposing a biological constraint. Here it refers to that the growth rates of species 1 and 3 have to be negative, and the growth rates of species 2 has to be positive calculate_omega(A) #relative size of the original interaction matrix calculate_omega_overlap(A, C1) #the normalized size of the feasibility domain of a random interaction matrix under linear biological constriants C1 calculate_omega_overlap(A, C2) #the normalized size of the feasibility domain of a random interaction matrix under linear biological constriants C2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.