ReadExperimentalData: read experimental data

Description Usage Arguments Value Examples

View source: R/ReadExperimentalData.r

Description

Reads experimental data for the causal reasoning algorithm from a text file.

Usage

1
ReadExperimentalData(fileName, network, removeDuplicates)

Arguments

fileName

a file containing the experimental data (text file format)

network

a (Computational) Causal Graph, as an igraph.

removeDuplicates

Optional, defaults to true. Remove duplicated nodes the experimental file (i.e. where the result for a node is repeated, use the first value given only; the alternative is to return a result which contains multiple rows for this node).

Value

(n x 2) matrix of nodes and direction of regulation. The first column of the matrix contains the node IDs from the network, and the second contains the experimental values.

Examples

1
2
3
4
5
6
7
#get path to example network file
network <- system.file(package='CausalR', 'extdata', 'testNetwork.sif')
##create ccg
ccg <- CreateCCG(network)
#get path to example experimental data
fileName<- system.file(package='CausalR', 'extdata', 'testData.txt')
ReadExperimentalData(fileName, ccg)

Example output

      testData <NA>
 [1,]        1    1
 [2,]        2   -1
 [3,]        3    1
 [4,]        4   -1
 [5,]        5    1
 [6,]        6   -1
 [7,]        7    1
 [8,]        8   -1
 [9,]        9    1
[10,]       10   -1

CausalR documentation built on Nov. 8, 2020, 5:25 p.m.