| woangers {ade4} | R Documentation |
This data set gives the presence of plant species in relevés of woodlands in the conurbation of Angers; and their biological traits.
data(woangers)
woangers is a list of 2 components.
li, nominal variable that indicates the presence (y) or absence (n) of
ligneous structures;
pr, nominal variable that indicates the presence (y) or absence (n) of
prickly structures;
fo, circular variable that indicates the month when the flowering period
starts (from 1 January to 9 September);
he, ordinal variable that indicates the maximum height of the leaf
canopy;
ae, ordinal variable that indicates the degree of aerial vegetative
multiplication;
un, ordinal variable that indicates the degree of underground vegetative
multiplication;
lp, nominal variable that represents the leaf position by 3 levels (ros =
rosette, semiros = semi-rosette and leafy = leafy stem);
le, nominal variable that represents the mode of leaf persistence by 5
levels (seasaes = seasonal aestival, seashib = seasonal hibernal, seasver =
seasonal vernal, everalw = always evergreen, everparti = partially evergreen);
auto = autopollination, insects = pollination by insects, wind =
pollination by wind); this fuzzy variable is expressed as proportions, i.e. for each
row, the sum of the three columns equals 1;
elaio = dispersion by ants, endozoo = injection by animals, epizoo =
external transport by animals, wind = transport by wind, unsp = unspecialized
transport); this fuzzy variable is expressed as proportions, i.e. for each row, the
sum of the three columns equals 1;
lo, quantitative variable that provides the seed bank longevity index;
lf, quantitative variable that provides the length of the flowering
period.
Pavoine, S., Vallet, J., Dufour, A.-B., Gachet, S. and Daniel, H. (2009) On the challenge of treating various types of variables: Application for improving the measurement of functional diversity. Oikos, 118, 391–402.
# Loading the data
data(woangers)
# Preparating of the traits
traits <- woangers$traits
# Nominal variables 'li', 'pr', 'lp' and 'le'
# (see table 1 in the main text for the codes of the variables)
tabN <- traits[, c(1:2, 7, 8)]
# Circular variable 'fo'
tabC <- traits[3]
tabCp <- prep.circular(tabC, 1, 12)
# The levels of the variable lie between 1 (January) and 12 (December).
# Ordinal variables 'he', 'ae' and 'un'
tabO <- traits[, 4:6]
# Fuzzy variables 'mp', 'pe' and 'di'
tabF <- traits[, 9:19]
tabFp <- prep.fuzzy(tabF, c(3, 3, 5), labels = c("mp", "pe", "di"))
# 'mp' has 3 levels, 'pe' has 3 levels and 'di' has 5 levels.
# Quantitative variables 'lo' and 'lf'
tabQ <- traits[, 20:21]
# Combining the traits
ktab1 <- ktab.list.df(list(tabN, tabCp, tabO, tabFp, tabQ))
## Not run:
# Calculating the distances for all traits combined
distrait <- dist.ktab(ktab1, c("N", "C", "O", "F", "Q"))
is.euclid(distrait)
# Calculating the contribution of each trait in the combined distances
contrib <- kdist.cor(ktab1, type = c("N", "C", "O", "F", "Q"))
contrib
dotchart(sort(contrib$glocor), labels = rownames(contrib$glocor)[order(contrib$glocor[, 1])])
## End(Not run)
> library(ade4)
> ### Name: woangers
> ### Title: Plant assemblages in woodlands of the conurbation of Angers
> ### (France)
> ### Aliases: woangers
> ### Keywords: datasets
>
> ### ** Examples
>
> # Loading the data
> data(woangers)
>
> # Preparating of the traits
> traits <- woangers$traits
> # Nominal variables 'li', 'pr', 'lp' and 'le'
> # (see table 1 in the main text for the codes of the variables)
> tabN <- traits[, c(1:2, 7, 8)]
> # Circular variable 'fo'
> tabC <- traits[3]
> tabCp <- prep.circular(tabC, 1, 12)
> # The levels of the variable lie between 1 (January) and 12 (December).
> # Ordinal variables 'he', 'ae' and 'un'
> tabO <- traits[, 4:6]
> # Fuzzy variables 'mp', 'pe' and 'di'
> tabF <- traits[, 9:19]
> tabFp <- prep.fuzzy(tabF, c(3, 3, 5), labels = c("mp", "pe", "di"))
> # 'mp' has 3 levels, 'pe' has 3 levels and 'di' has 5 levels.
> # Quantitative variables 'lo' and 'lf'
> tabQ <- traits[, 20:21]
>
> # Combining the traits
> ktab1 <- ktab.list.df(list(tabN, tabCp, tabO, tabFp, tabQ))
>
> # Calculating the distances for all traits combined
> distrait <- dist.ktab(ktab1, c("N", "C", "O", "F", "Q"))
> is.euclid(distrait)
[1] FALSE
>
> # Calculating the contribution of each trait in the combined distances
> contrib <- kdist.cor(ktab1, type = c("N", "C", "O", "F", "Q"))
> contrib
$paircov
li pr lp le fo
li 0.2500534939 2.471981e-02 0.038851022 0.0200445124 1.447475e-03
pr 0.0247198080 1.997226e-01 -0.030237798 -0.0018367708 -4.197371e-05
lp 0.0388510224 -3.023780e-02 0.244163852 0.0367008519 -5.703983e-03
le 0.0200445124 -1.836771e-03 0.036700852 0.2154214983 -1.559745e-03
fo 0.0014474751 -4.197371e-05 -0.005703983 -0.0015597448 4.528208e-02
he 0.0680421313 8.466469e-04 0.025604692 0.0212553246 -1.418924e-03
ae -0.0018812563 -1.601963e-02 0.008221023 0.0057194746 1.306038e-02
un 0.0036063382 1.516450e-02 -0.010585786 0.0143104555 7.271514e-03
mp 0.0024114632 -1.555895e-02 0.013304589 -0.0069409683 -2.963572e-03
pe -0.0003519038 -1.142511e-02 0.004390976 0.0097460052 -6.007740e-03
di 0.0592153472 -1.385170e-02 0.044325306 0.0145622107 -2.335351e-03
lo 0.0091396503 9.856243e-03 -0.001868482 0.0121343465 3.625808e-03
lf 0.0002981235 4.051590e-03 0.003811518 0.0003994357 -1.510210e-03
he ae un mp pe
li 0.0680421313 -0.0018812563 0.0036063382 0.0024114632 -0.0003519038
pr 0.0008466469 -0.0160196292 0.0151645015 -0.0155589542 -0.0114251127
lp 0.0256046923 0.0082210230 -0.0105857858 0.0133045886 0.0043909764
le 0.0212553246 0.0057194746 0.0143104555 -0.0069409683 0.0097460052
fo -0.0014189236 0.0130603753 0.0072715136 -0.0029635716 -0.0060077398
he 0.0574719777 0.0070992310 -0.0010677103 0.0041920534 -0.0082371855
ae 0.0070992310 0.1326613899 -0.0055169804 -0.0119644203 -0.0081662316
un -0.0010677103 -0.0055169804 0.1728843882 -0.0058348243 -0.0072676018
mp 0.0041920534 -0.0119644203 -0.0058348243 0.1950443384 0.0008347567
pe -0.0082371855 -0.0081662316 -0.0072676018 0.0008347567 0.0877808785
di 0.0241651036 -0.0009142773 0.0066962660 0.0278340279 0.0095001949
lo 0.0033306640 -0.0030305774 0.0078721307 -0.0089371746 -0.0077967582
lf -0.0026447598 -0.0002323546 0.0001973648 0.0034482577 0.0004945621
di lo lf
li 0.0592153472 0.009139650 0.0002981235
pr -0.0138516994 0.009856243 0.0040515896
lp 0.0443253062 -0.001868482 0.0038115180
le 0.0145622107 0.012134346 0.0003994357
fo -0.0023353509 0.003625808 -0.0015102103
he 0.0241651036 0.003330664 -0.0026447598
ae -0.0009142773 -0.003030577 -0.0002323546
un 0.0066962660 0.007872131 0.0001973648
mp 0.0278340279 -0.008937175 0.0034482577
pe 0.0095001949 -0.007796758 0.0004945621
di 0.1841159926 0.014572402 0.0024682582
lo 0.0145724018 0.061043909 -0.0014773201
lf 0.0024682582 -0.001477320 0.0209363204
$paircor
li pr lp le fo
li 1.000000000 0.1106152512 0.15723358 0.086362888 0.0136028981
pr 0.110615251 1.0000000000 -0.13692913 -0.009009945 -0.0004413677
lp 0.157233581 -0.1369291310 1.00000000 0.159827877 -0.0542468263
le 0.086362888 -0.0090099446 0.15982788 1.000000000 -0.0157493640
fo 0.013602898 -0.0004413677 -0.05424683 -0.015749364 1.0000000000
he 0.567588221 0.0079024292 0.21614779 0.189447455 -0.0278142752
ae -0.010328660 -0.0997944149 0.04556777 0.033606280 0.1681535156
un 0.017344303 0.0827515807 -0.05139838 0.073910180 0.0820105076
mp 0.010919468 -0.0785817255 0.06123574 -0.033911383 -0.0321943061
pe -0.002375240 -0.0862873064 0.02999304 0.070507551 -0.0952901382
di 0.275979010 -0.0720054108 0.20879827 0.073540182 -0.0255916725
lo 0.073965943 0.0922461136 -0.01520356 0.107350984 0.0690026317
lf 0.004120307 0.0626558533 0.05330981 0.005937895 -0.0490483097
he ae un mp pe di
li 0.56758822 -0.010328660 0.01734430 0.010919468 -0.002375240 0.275979010
pr 0.00790243 -0.099794415 0.08275158 -0.078581726 -0.086287306 -0.072005411
lp 0.21614779 0.045567771 -0.05139838 0.061235742 0.029993038 0.208798270
le 0.18944745 0.033606280 0.07391018 -0.033911383 0.070507551 0.073540182
fo -0.02781428 0.168153516 0.08201051 -0.032194306 -0.095290138 -0.025591673
he 1.00000000 0.081759418 -0.01077145 0.039266816 -0.115971376 0.236949219
ae 0.08175942 1.000000000 -0.03642934 -0.074427901 -0.074891813 -0.006193944
un -0.01077145 -0.036429338 1.00000000 -0.032340431 -0.058384579 0.037654676
mp 0.03926682 -0.074427901 -0.03234043 1.000000000 0.006346682 0.146273813
pe -0.11597138 -0.074891813 -0.05838458 0.006346682 1.000000000 0.074343032
di 0.23694922 -0.006193944 0.03765468 0.146273813 0.074343032 1.000000000
lo 0.05630599 -0.034236757 0.07586800 -0.083443578 -0.096809073 0.144618408
lf -0.07624441 -0.004360944 0.00324484 0.053466747 0.011536411 0.039689434
lo lf
li 0.07396594 0.004120307
pr 0.09224611 0.062655853
lp -0.01520356 0.053309808
le 0.10735098 0.005937895
fo 0.06900263 -0.049048310
he 0.05630599 -0.076244407
ae -0.03423676 -0.004360944
un 0.07586800 0.003244840
mp -0.08344358 0.053466747
pe -0.09680907 0.011536411
di 0.14461841 0.039689434
lo 1.00000000 -0.040074265
lf -0.04007426 1.000000000
$glocor
global distance
li 0.5859411
pr 0.2309621
lp 0.4632443
le 0.4484787
fo 0.1331704
he 0.5098172
ae 0.1979766
un 0.2926322
mp 0.2867519
pe 0.1356886
di 0.5223928
lo 0.2492998
lf 0.1290551
> dotchart(sort(contrib$glocor), labels = rownames(contrib$glocor)[order(contrib$glocor[, 1])])
>
>
>
>
>