Before (I hope!) someone else answers in an unkind tone (and someone probably will), I have a few suggestions:
1) please use plain text email (an option somewhere in your email software). Using HTML email usually makes the email harder to read on r-help. 2) if at all possible, please try to construct an example that other people can easily run for themselves and provide the data. It makes it much easier to provide help. This may be hard for someone new to R, but it is worth it. The usual suggestion is to use the dput() function to include example data in your email (or the real data if there's not too much of it, and you are able to share). 3) please identify which packages your functions come from, since they are not (I believe) part of base R. Sometimes it is essential to also include the output of sessionInfo() 4) and check the posting guide mentioned at the bottom of the email for suggestions on how to ask a question so as to have the best chance of getting good answers. Expectation are pretty high on r-help. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/1/15, 2:04 PM, "marion howard" <marion.how...@hotmail.com> wrote: >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]] > >______________________________________________ >R-help@r-project.org 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. ______________________________________________ R-help@r-project.org 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.