Functions to calculate Unique Trait Combinations (UTC) and scaled
Unique Trait Combinations (sUTC) as measures of multivariate richness. The
package can also calculate beta-diversity for trait richness and can
partition this into nestedness-related and turnover components. The code
will also calculate several measures of overlap. See Keyel and Wiegand
# The code does not adequately check that the incoming data is in the correct format. # Code does not switch from data frame to matrix, but instead is expected to crash with an otherwise suitable data frame (categorization step) # Some R functions may produce lists that look like matrices. These will crash this script. # Categorization is acheived via rounding. This is not an inherent property of MVR, but was a quick and easy convenience used by me. # Currently all traits must be rounded to the same decimal place. Again, not an inherent property of MVR, but a programming short-cut for convenience. # Script is not yet set up to work with abundance data, consequently, the unequal.abund option does not appear anywhere else in the script. # st.range option is non-functional, currently all standardization needs to be performed outside of the script. # log.trans option may not work. I found it easier to log-transform the data in Excel, and then load it into R, so I have not rigorously tested these options. # No option to calculate traitspace from non-overlapping categories (e.g., as in species richness example). These trait spaces need to be calculated outside of the package and entered as inputs # No option to turn off raw mvo, and this output is bulky and may clutter up the output # Under some inputs, the calc.mvo function returns an error. See additional details
#Under some inputs, the calculation of overlap does not work properly # ON 16 Mar 2014 Received the following error: # Error in matrix(b.mat, nrow = length(br.nams2), dimnames = list(br.nams2, : data is too long # traceback() #7: matrix(b.mat, nrow = length(br.nams2), dimnames = list(br.nams2, bc.nams)) at MVR.r#489 #6: calc.mvo(com.mat, dups) at MVR.r#271 #5: calc.mvd(cat.mat, in.com, traitspace, calc.ovr) at MVR.r#113 #4: mvfd(rt.mat, com.mat, resolution = resolution) at #6 #3: calc.fd(sub.mat, com.mat, index.type) at #64 #2: do.scnII(this.index, b.mat, i, this.combo, sp.rich.vec, num.rand) at #17 #1: scnII(IndexType, combo.vec, b.mat, sp.rich.vec, lcv, lit, num.rand) at #18 # Appears to be a bug in calc.ovr (although it is possible it is external to calc.mvo). # The temporary fix was to set calc.ovr = 0 and re-run the code.