Skip to content

Commit

Permalink
[force] document various methods of as_force_data()
Browse files Browse the repository at this point in the history
  • Loading branch information
cjyetman committed Dec 25, 2023
1 parent 2916985 commit 0475244
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 6 deletions.
25 changes: 19 additions & 6 deletions R/as_force_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,17 @@
#' The `force_network` function uses a 'native' data format that consists of a...
#'
#' @md
#'
#' @export

as_force_data <- function(.data, ...) {
UseMethod("as_force_data")
}


#' @describeIn as_force_data
#' @describeIn as_force_data Convert data found at a URL to an appropriate
#' network data list
#'
#' @export

as_force_data.character <- function(.data, ...) {
Expand All @@ -27,7 +30,9 @@ as_force_data.character <- function(.data, ...) {
}


#' @describeIn as_force_data
#' @describeIn as_force_data Convert a data frame containing links data to an
#' appropriate network data list
#'
#' @export

as_force_data.data.frame <-
Expand All @@ -42,7 +47,9 @@ as_force_data.data.frame <-
}


#' @describeIn as_force_data
#' @describeIn as_force_data Convert an igraph object to an appropriate network
#' data list
#'
#' @export

as_force_data.igraph <-
Expand Down Expand Up @@ -70,7 +77,9 @@ as_force_data.igraph <-
}


#' @describeIn as_force_data
#' @describeIn as_force_data Convert a hclust object to an appropriate network
#' data list
#'
#' @export

as_force_data.hclust <-
Expand Down Expand Up @@ -103,7 +112,9 @@ as_force_data.hclust <-
}


#' @describeIn as_force_data
#' @describeIn as_force_data Convert a dendrogram object to an appropriate network
#' data list
#'
#' @export

as_force_data.dendrogram <-
Expand All @@ -115,7 +126,9 @@ as_force_data.dendrogram <-
}


#' @describeIn as_force_data
#' @describeIn as_force_data Convert a list object containg a links and a nodes
#' data frame to an appropriate network data list
#'
#' @export

as_force_data.list <-
Expand Down
39 changes: 39 additions & 0 deletions man/as_force_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0475244

Please sign in to comment.