mdPlot: plot missing data across an alignment in R

(First github file!)
mdPlot is an R function that uses "ggplot2" and "reshape" to read in a phylip-formatted alignment, count the missing data in each row, and plot the percentage of missing data for each sample, as well as the total missing data in the whole alignment (ie total # N's/total sites in the alignment). You will notice that it is frustratingly slow (~1 min for an alignment of 20,000 SNP's and 40 samples) - that's mostly because of the for loop kludge in there - but it does what I want it to do so I'm not going to fix it any more. Highly recommend using Adobe Illustrator's "align" button to clean up the alignment of the sample names if you want to include a plot in your supplemental materials. 

Usage is: <mdPlot("pathToYourAlignment")>

To plot in the original order of samples in the alignment, remove lines 17 and 18 and re-load the function. To plot samples on the x-axis just remove the coord_flip() command on the last line, and be prepared to adjust the position of the "Total Missing Data" annotation.