Given is a tree:
library(igraph) # setup graph g= graph.formula(A -+ B, A -+ C, B -+ C, B -+ D,
Based on Gabor's comment:
all_simple_paths(g, from = root, to = leaves)
yields:
[[1]] + 3/5 vertices, named: [1] A B C [[2]] + 3/5 vertices, named: [1] A B D [[3]] + 3/5 vertices, named: [1] A B E [[4]] + 2/5 vertices, named: [1] A C