Description Usage Arguments Details Examples
View source: R/geneticqgraph-plot.R
qgraph plot
1 2 3 4 5 |
tmpCor |
correlation matrix |
Please see qgraph
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | data(corrplot_data)
metaname <-names(corrplot_data)
tmpDataset <- as.matrix(corrplot_data);
set.seed(1)
Pathway <- sort(paste0("p",as.integer(runif(length(metaname), 0, 1)*3+1)))
step 3, handle pathway info
pathwayData <- data.frame(Var= (metaname),
Pathway = ((Pathway)))
# generate suitable group index
qgraph_path <- pathwayData[with(pathwayData, order(Pathway)), ] # sort data frame by column Pathway
qgraph_path$Var <- as.character(qgraph_path$Var)
tmp <- tmpDataset[,c(qgraph_path$Var)] # select pathway subset according to sorted order
qgraph_groups <- as.character(qgraph_path$Pathway); # generate group index
sample_size <- nrow(tmp)
tmpCor <- cor(tmp, use ="pairwise.complete.obs" ,method="pearson");
genericqgraph(tmpCor,groups=qgraph_groups,graph = "pcor",
sampleSize=sample_size,title=paste(sub_time,gen,"partial corre"),
threshold = "BH",minimum = "sig",
);
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.