Skip to content

Commit

Permalink
igraph tweaks & typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jefferis committed Jan 20, 2024
1 parent a1ef4d7 commit 735628d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/neuron.R
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ distal_to <- function(x, node.idx=NULL, node.pointno=NULL, root.idx=NULL,
g=as.directed.usingroot(gorig, root = root.idx)
}

#Step3: For each node id, travese the graph from the given node using depth first search and return the visited
#Step3: For each node id, traverse the graph from the given node using depth first search and return the visited
#nodes..
l=sapply(node.idx, dfs_traversal, g, simplify = FALSE)
if(length(node.idx)==1) l[[1]] else l
Expand Down
4 changes: 2 additions & 2 deletions R/ngraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -533,11 +533,11 @@ prune_strahler<-function(x, orderstoprune=1:2, ...) {
prune_vertices<-function(x, verticestoprune, invert=FALSE, ...) {
g=as.ngraph(x)

# because igraph.vs sequences are atttached to a specific graph
# because igraph.vs sequences are attached to a specific graph
if(inherits(verticestoprune, "igraph.vs"))
verticestoprune=as.integer(verticestoprune)
if(invert) {
nvertices=nrow(xyzmatrix(x))
nvertices=igraph::vcount(g)
verticestoprune=setdiff(seq_len(nvertices), verticestoprune)
}
dg=igraph::delete_vertices(g, verticestoprune)
Expand Down

0 comments on commit 735628d

Please sign in to comment.