Learn R Programming

simone (version 1.0-4)

getNetwork: Network extraction from a SIMoNe run

Description

When running simone, a family of networks is generated and one may want to pick one of them according to a given criterion. This is the job handled by the getNetwork function.

Usage


getNetwork(object,
           selection = length(object$clusters),
           nodes     = NULL)

Arguments

object

output of a SIMoNe run (must be an object of class simone)

selection

either a character string ("BIC" or "AIC") or an integer (a number of edges) that specifies how the network is selected from the list generated by simone. When a number num of edges is specified, the network is extracted by picking from the list the network with at most num edges. The effective number num will be displayed. Default is to extract a number of edges at most equal to the number of variables.

nodes

a vector of character string or integers used to extract a sub-part of the selected network, which can be more readable. When NULL (the default), all the variables are kept.

Value

Returns an object of class simone.network, see rNetwork for further details.

See Also

simone, rNetwork, plot.simone.network.

Examples

Run this code
# NOT RUN {
## load the breast cancer data set
data(cancer)
attach(cancer)

## launch SIMoNe on the full data set
res <- simone(expr)

## the default selected network (at most p edges)
plot(getNetwork(res))

## a sub network on some 10 randomly selected genes
plot(getNetwork(res,"BIC", nodes = sample(colnames(expr),10)))

## a network with a penalty corresponding to at most 40 edges
plot(getNetwork(res, 40))

detach(cancer)
# }

Run the code above in your browser using DataLab