network: Plot the comorbidity analysis results in a network

Description Usage Arguments Value Examples

View source: R/network.R

Description

Given an object of class cAnalysis or molecularcAnalysis obtained from a comorbidity analysis, a network is obtained.

Usage

1
2
3
4
network(input, databasePth, layout = "layout.fruchterman.reingold",
  selectValue = "score", title = "Comorbidity network", cutOff = 0,
  npairs = 0, prop = 1, interactive = FALSE, diseaseColor = "pink",
  comorColor = "lightblue", verbose = FALSE)

Arguments

input

A cAnalysis or molecularcAnalysis object, obtained by applying the comorbidityAnalysis or comorbidityAnalysisMolecular function

databasePth

Determines the path where the intermediate RData objects have been created. It is the same path where the three required input files (patientData, diagnosisData, admissionData) are located.

layout

By default 'layout.fruchterman.reingold'. It can be set to any other of the possible igraph layouts.

selectValue

By default "score" variable will be selected. Change it to any of the other possible variables ('correctedPvalue','odds ratio', 'phi', 'rr').

title

Determines the title of the network figure. By default 'Comorbidity network'.

cutOff

By default '0.05'. The value of the argument can be changed to any other numeric variable, according to the range of the selected value.

npairs

by default '0'. The value of the argument can be changed to any other numeric variable to show in the network only those comorbidities suffered by at least npairs of patients.

prop

Determines the node size proportionality. By default it is set to 1. The value of the argument can be changed to any other numeric variable.

interactive

Determines if the output network is interactive or not. By default the interactive argument is set up as FALSE. The value of the argument can be changed to TRUE, as a result an interactive network will be obtained.

diseaseColor

Determines the node color for the disorder of interest. By default it is set to "pink".

comorColor

Determines the node color for the comorbid disorders. By default it is set to "lightblue".

verbose

By default FALSE. Change it to TRUE to get a on-time log from the function.

warnings

By default TRUE. Change it to FALSE to don't see the warnings.

Value

A network

Examples

1
2
3
4
5
6
7
8
9
load(system.file("extdata", "comorMale.RData", package="comoRbidity"))
comorbidityNetwork <- network( 
              input            = comorMale,
              databasePth      = system.file("extdata", package="comoRbidity"), 
              selectValue      = "score",
              cutOff           = 1.5,
              npairs           = 2,
              title            = "Example comorbidity network"
              )

aGutierrezSacristan/comorbidity documentation built on April 10, 2020, 5:54 p.m.