network: Creates a network object from a SIF file

Description Usage Arguments Value Author(s) Examples

Description

Generates a network object using the contain of a SIF file. When a file is specified for the subnetwork to be tested, the information of the subnetwork is extracted from the SIF file and added to the network object.

Usage

1
network(netFileName, fileType = "sif", subNetFileName = NULL)

Arguments

netFileName

a character string for the name of file in SIF format that contains the information of the global network.

fileType

The format of the file. At this moment, only "SIF" format is accepted. Default: "sif".

subNetFileName

a character string for the name of file in SIF format that contains the information of the subnetwork. This parameter is not mandatory. The information for the subnetwork is only extracted when a filename is given. Default: NULL.

Value

a list marked as an network class is returned. This list has the following components:

Author(s)

Pascal Belleau, Astrid Deschenes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Access SIF file for global network stored in subnetsim package
networkFile <- system.file("extdata", "demo_network.sif",
package="subnetsim")

## Create a network without the subnetwork information
demo_network <- network(netFileName = networkFile)

## Access SIF file for global network stored in subnetsim package
subnetworkFile <- system.file("extdata", "demo_subnetwork.sif",
package="subnetsim")

## Create a network with the subnetwork information
demo_network_with_sub <- network(netFileName = networkFile,
    subNetFileName = subnetworkFile)

## The network is of object of class "network"
class(demo_network_with_sub)

## The list of nodes present in the subnetwork
demo_network_with_sub$nodesSubNet

belleau/subnetsim documentation built on May 27, 2019, 2:08 p.m.