Learn R Programming

snha (version 0.1.3)

as.list.snha: return a list representation for an snha graph object

Description

The function `as.list.snha` provides a S3 method to convert a snha graph object into a list object which can be for instance used to write a report into an XLSX file using the library openxlsx.

Usage

# S3 method for snha
as.list(x,...)

Value

list object with the components: 'chains' (the association chain), 'data' (original data), 'theta' (adjacency matrix, 'sigma' (correlations), 'p.value' (correlation p-values)

Arguments

x

snha graph object created with the snha function

...

additional arguments, delegated to the list command

See Also

plot.snha, snha

Examples

Run this code
data(swiss) 
as=snha(swiss,method="spearman",alpha=0.1) 
result=as.list(as) 
ls(result) 
result$settings 
# can be writte as xlsx file for instance like: 
# library(openxlsx) 
# write.xlsx(result,file="some-result.xlsx") 

Run the code above in your browser using DataLab