nat
nat copied to clipboard
bug in endpoints with multiple subtrees
> endpoints(lptcin.mids[[1]], subtrees = 1:2)
Error in UseMethod("as.ngraph") :
no applicable method for 'as.ngraph' applied to an object of class "c('seglist', 'list')"
> traceback()
6: as.ngraph(x)
5: endpoints(as.ngraph(x))
4: FUN(X[[i]], ...)
3: lapply(x$SubTrees[subtrees], function(x) endpoints(as.ngraph(x)))
2: endpoints.neuron(lptcin.mids[[1]], subtrees = 1:2)
1: endpoints(lptcin.mids[[1]], subtrees = 1:2)
Hi @Erginkayam somehow dropped this last summer, but hit it recently myself. One workaround was to convert the neuron to an ngraph
object, but this returns all endpoints rather than allowing you to retrieve them for identified subtrees:
ng=lptcin.mids[[1]]
endpoints(ng)
I will commit a fix shortly.
Great, thank you for the heads up!