My workspace objects: http://www.filedropper.com/workspace1_1
Hello everyone. I need help calculating FD as stated in Petchey & Gaston 2002 in R. I have a series of communities with present/absent kind of species data (object name: comm) and traits data (object name: zscores) which have been standardized. I'm trying to follow "http://rfunctions.blogspot.com/2012/05/functional-diversity-fd-petchey-gaston.html" to calculate FD index but I always fail and get the error message "Error in rep(NA, nEdges) : invalid 'times' argument. In addition: Warning message: In drop.tip(tree, treeabsent) : drop all tips of the tree: returning NULL". I made sure that my data has no NA's and I really have no idea about what else to do to calculate FD by using the method outlined in the link below (uses phylogenetic diversity approach to calculate FD actually). I really need some expert help here. By the way, I'm using the packages "picante" and "ade4" as advised in the source above. I should add that FD package doesn't offer a tool to calculate FD (it has functions to calculate Fric, Fdiv, Feve etc. but not FD index) as far as I know. I mean I couldn't see it on the manual. Thanks in advance!