This is the correct installation order.
install_order(graph)
A named list of character vectors, interpreted as an adjacnecy list. If A->B then package A depends on package B, so package B must be loaded before package A.
A->B
A
B
Character vector of package names in an order that can be used to install them.