# NOT RUN {
data(ifri)
importancevalue(ifri, site='plotID', species='species', count='count',
basal='basal', factor='forest', level='YSF')
importancevalue.comp(ifri, site='plotID', species='species', count='count',
basal='basal', factor='forest')
# When all survey plots are the same size, importance value
# is not affected. Counts and basal areas now calculated per square metre
ifri$count <- ifri$count/314.16
ifri$basal <- ifri$basal/314.16
importancevalue(ifri, site='plotID', species='species', count='count',
basal='basal', factor='forest', level='YSF')
importancevalue.comp(ifri, site='plotID', species='species', count='count',
basal='basal', factor='forest')
# Calculate diversity profiles from importance values
imp <- importancevalue.comp(ifri, site='plotID', species='species',
count='count', basal='basal', factor='forest')
vals <- imp[["values"]]
for (i in 1:length(vals)) {
imp.i <- data.frame(imp[[vals[i]]])
name.i <- paste(vals[[i]], ".Renyi", sep="")
imp[[name.i]] <- renyi(imp.i$importance.value)
}
# LOT more diverse
imp$LOT.Renyi - imp$MCF.Renyi
imp$LOT.Renyi - imp$YSF.Renyi
# YSF and MCF different richness and evenness
imp$YSF.Renyi - imp$MCF.Renyi
# }
Run the code above in your browser using DataLab