As a follow-up to Don's reply have a look at https://github.com/hadley/devtools/wiki/Reproducibility and/or ttp://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example for some useful suggestions on how to frame a question.
If you need to include sample data with your reply please read carefully about the dput function and supply your data in dput() format. John Kane Kingston ON Canada > -----Original Message----- > From: [email protected] > Sent: Thu, 2 Apr 2015 07:04:50 +1000 > To: [email protected] > Subject: [R] Error in dis[sppInSample,sppInSample]:subscript out of > bounds > > Hello, > I am new to R and am encountering an error message that I cannot find a > solution for. > I am attempting to calculate MPD (mean pairwise distance), without > weighting for abundance, with a community species list and a phylogenetic > tree in newick format with branch lengths. > I have read in both list and tree .txt files and calculated PD without > any problem. > To calculate MPD I have entered:>MPD1=mpd(list,cophenetic(tree)) > Error:Error in dis[sppInSample, sppInSample] : subscript out of bounds > Thank you for you helpCheersMarion. > [[alternative HTML version deleted]] > > ______________________________________________ > [email protected] mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. ____________________________________________________________ FREE ONLINE PHOTOSHARING - Share your photos online with your friends and family! Visit http://www.inbox.com/photosharing to find out more! ______________________________________________ [email protected] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

