An R package implementing an algorithms to find valleys in a graph