From 8f79192bb5d776f7ceb598541a615e29e74232ea Mon Sep 17 00:00:00 2001 From: Romain Franconville Date: Mon, 27 Jan 2020 18:57:15 -0500 Subject: [PATCH] Adding basic examples for path functions. --- R/connectivity.R | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/R/connectivity.R b/R/connectivity.R index ccb42e22..38aea1bc 100644 --- a/R/connectivity.R +++ b/R/connectivity.R @@ -229,6 +229,10 @@ neuprint_simple_connectivity <- function(bodyids, #' \code{\link{neuprint_common_connectivity}}, #' \code{\link{neuprint_get_adjacency_matrix}} #' @export +#' @examples +#' \donttest{ +#' neuprint_get_paths(c(695956656,725951521),755644082,c(2,3),weightT=20) +#' } neuprint_get_paths <- function(body_pre, body_post, n, weightT=5, roi=NULL, dataset = NULL, conn = NULL, all_segments=FALSE, ...){ @@ -284,6 +288,7 @@ neuprint_get_paths <- function(body_pre, body_post, n, weightT=5, roi=NULL, stringsAsFactors = FALSE) })), error= function(e) NULL) })) + connTable } #' @title Get a list of the shortest paths between two neurons @@ -308,6 +313,10 @@ neuprint_get_paths <- function(body_pre, body_post, n, weightT=5, roi=NULL, #' \code{\link{neuprint_common_connectivity}}, #' \code{\link{neuprint_get_adjacency_matrix}} #' @export +#' @examples +#' \donttest{ +#' neuprint_get_shortest_paths(c(1128092885,481121605),5813041365,weightT=20) +#' } neuprint_get_shortest_paths <- function(body_pre,body_post,weightT=5,roi=NULL,dataset = NULL, conn = NULL,all_segments=FALSE, ...){ conn <- neuprint_login(conn) @@ -349,6 +358,7 @@ neuprint_get_shortest_paths <- function(body_pre,body_post,weightT=5,roi=NULL,da stringsAsFactors = FALSE) })), error = function(e) NULL) })) + connTable } # hidden, caution, does not deal with left/right neuropils