Rneighbor(D, path=NULL , ...)"phylo" that is the NJ or UPGMA tree.quiet suppress some output to R console (defaults to quiet = FALSE); method - can be "NJ" or "nj" (for neighbor-joining), or "UPGMA" or "UPGMA" (for UPGMA); random.order add taxa to tree in random order (defaults to random.order = TRUE); outgroup outgroup if outgroup rooting of the estimated tree is desired (only works for method = "NJ", UPGMA trees are already rooted); and cleanup remove PHYLIP input & output files after the analysis is completed (defaults to cleanup = TRUE).
More information about the neighbor program in PHYLIP can be found here Rdnadistdata(primates)
D<-dist.dna(data(primates),model="JC")
tree<-Rneighbor(D)Run the code above in your browser using DataLab