extend_subnets: Extend subnetworks from smaller subnetworks

Description Usage Arguments Details Value Examples

Description

Extend subnetworks by pairwise overlapping two sets of smaller subnetworks.

Usage

1
extend_subnets(subnet1, subnet2, size = 0)

Arguments

subnet1

The matrix representing the first set of subnetworks

subnet2

The matrix representing the second set of subnetworks

size

The desired size of extended subnetworks

Details

Enumerate all possible subnetworks of desired size by pairwise overlapping two sets of subnetworks of size s1 and s2. The desired size should be between max(s1,s2)+1 and s1+s2-1. Invalid desired size will be replaced by the minimum allowed value max(s1,s2)+1.

Value

A matrix represents the extended subnetworks, in which each row represents a subnetwork.

Examples

1
2
3
4
5
6
library(Corbi)
net <- matrix(FALSE, nrow=10, ncol=10)
net[sample.int(100, 20)] <- TRUE
net <- net | t(net)
subnets <- get_subnets(net, 3)
subnets[[4]] <- extend_subnets(subnets[[3]], subnets[[2]], 4)


Search within the Corbi package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.