#' giant_component
#'
#' @param graph igraph graph
#' @export
#' @importFrom igraph clusters induced.subgraph
#'
giant_component <- function(graph){
cl <- igraph::clusters(graph)
return(igraph::induced.subgraph(graph, which(cl$membership == which.max(cl$csize))))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.