write.interaction_table: write.interaction_table

View source: R/data_refinement.R

write.interaction_tableR Documentation

write.interaction_table

Description

Takes an interaction_table and writes it to a file. For information about parameters, see output_ccrepe_data

Usage

write.interaction_table(significant_interactions, filename, csv_option = "2")

Arguments

significant_interactions

An interaction_table returned from create_interaction_table

filename

What is the name of the output file (including path). Ignored if output.file is TRUE

csv_option

If assigned the value '2', the function will use the write.csv2 function which print the numbers if comma as decimal delimer and semicolon as the delimer between numbers. Else, the decimal delimer is point and comma the delimer between numbers.

Examples

library(micInt)
data("seawater")
sim.scores <- similarity_measures(subset= c("spearman","pearson"))
res <- runAnalysis(OTU_table = seawater,iterations = 100,
sim.scores = sim.scores,parallel = FALSE)
int_table <- res$similarity_measures_significance$spearman
write.interaction_table(int_table,"ccrepe_results.csv",csv_option = "1")
# Ensures the file is deleted after running example
unlink("ccrepe_results.csv")

AlmaasLab/micInt documentation built on April 1, 2022, 10:37 a.m.