diff --git a/R/exportNetworkToHTML.R b/R/exportNetworkToHTML.R index bda111b..aa54155 100644 --- a/R/exportNetworkToHTML.R +++ b/R/exportNetworkToHTML.R @@ -1,13 +1,32 @@ -#' Export network data with Cytoscape visualization +```r +#' Export Network Data to HTML with Cytoscape Visualization #' -#' Convenience function that takes nodes and edges data directly and creates -#' both the configuration and HTML export in one step. +#' @description +#' This function exports network data to an HTML file with a Cytoscape +#' visualization. It takes nodes and edges data directly and creates both the +#' configuration and HTML export in one step, providing a convenient way to +#' visualize network data. +#' +#' @param nodes \code{data.frame} containing the nodes of the network. Each row +#' represents a node with at least an \code{id} column. +#' @param edges \code{data.frame} containing the edges of the network. Each row +#' represents an edge with at least \code{source} and \code{target} columns. +#' @param filename \code{character} string specifying the output HTML filename. +#' Defaults to \code{"network_visualization.html"}. +#' @param displayLabelType \code{character} string indicating the type of label +#' to display on nodes. Defaults to \code{"id"}. +#' @param nodeFontSize \code{numeric} value specifying the font size of node +#' labels. Defaults to \code{12}. +#' @param ... Additional arguments passed to \code{exportCytoscapeToHTML()}. +#' +#' @return Invisibly returns the file path of the created HTML file. +#' +#' @examples +#' nodes <- data.frame(id = c("A", "B", "C")) +#' edges <- data.frame(source = c("A", "B"), target = c("B", "C")) +#' exportNetworkToHTML(nodes, edges, filename = "my_network.html") #' -#' @inheritParams cytoscapeNetwork -#' @param filename Output HTML filename -#' @param ... Additional arguments passed to exportCytoscapeToHTML() #' @export -#' @return Invisibly returns the file path of the created HTML file exportNetworkToHTML <- function(nodes, edges, filename = "network_visualization.html", displayLabelType = "id", @@ -65,4 +84,5 @@ previewNetworkInBrowser <- function(nodes, edges, } invisible(temp_file) -} \ No newline at end of file +} +``` \ No newline at end of file