diff --git a/R/analysis/lmer.output-fun.R b/R/analysis/lmer.output-fun.R index 5ebe5461f23d016d3e68811205fc1272f83aabca..bdeadae4c7144e0bf36b4264fa621b4f1af515f2 100644 --- a/R/analysis/lmer.output-fun.R +++ b/R/analysis/lmer.output-fun.R @@ -207,7 +207,7 @@ segments( unlist(x - 1.96*sd), y-small.bar, unlist(x -1.96*sd), y+small.bar, . segments( unlist(x + 1.96*sd), y-small.bar, unlist(x +1.96*sd), y+small.bar, ...) } -fun.col.param <- function(){ +fun.col.param <- function(){ t.col <- c('#e41a1c', '#377eb8', '#4daf4a', '#984ea3', '#ff7f00') names(t.col) <- c("Tf","sumBn", "sumTnBn", @@ -308,6 +308,22 @@ data.frame('logG' = 0, 'sumTfBn' = Tf.high*seq.sumBn/sd_sumTfBn, 'sumTnBn' = Tf.low*seq.sumBn/sd_sumTnBn, 'sumTnTfBn.abs' = abs(Tf.high - Tf.low)*seq.sumBn/sd_sumTnTfBn.abs) +d3b.l <- +data.frame('logG' = 0, + 'logD' = D.mean, + 'Tf' = rep(Tf.low, length(seq.sumBn)), + 'sumBn' = seq.sumBn/sd_sumBn, + 'sumTfBn' = Tf.low*seq.sumBn/sd_sumTfBn, + 'sumTnBn' = Tf.high*seq.sumBn/sd_sumTnBn, + 'sumTnTfBn.abs' = abs(Tf.high - Tf.low)*seq.sumBn/sd_sumTnTfBn.abs) +d3b.h <- +data.frame('logG' = 0, + 'logD' = D.mean, + 'Tf' = rep(Tf.high, length(seq.sumBn)), + 'sumBn' = seq.sumBn/sd_sumBn, + 'sumTfBn' = Tf.high*seq.sumBn/sd_sumTfBn, + 'sumTnBn' = Tf.high*seq.sumBn/sd_sumTnBn, + 'sumTnTfBn.abs' = 0*seq.sumBn/sd_sumTnTfBn.abs) ## DATA FOR MATRIX PLOT length.T <- 20 @@ -333,6 +349,8 @@ new.data <- switch(type, Tn.h = d2.h, Tabs.l = d3.l, Tabs.h = d3.h, + Tabs.b.l = d3b.l, + Tabs.b.h = d3b.h, matrix = d4) return(new.data) } @@ -436,8 +454,10 @@ for (i in traits){ list.temp <- list.res[[paste(data.type, "_", i , "_", model, sep = '')]] - - list.df[[i]] <- fun.pred.BA.l.and.h(i, type, dir.root, list.temp) + if (i %in% c('SLA', 'Max.height') & type == 'Tabs'){ + type.b <- 'Tabs.b' + }else{type.b <- type} + list.df[[i]] <- fun.pred.BA.l.and.h(i, type.b, dir.root, list.temp) } dat.res <- data.frame(do.call('rbind', list.df), traits = rep(traits, each = 2*N.pred)) @@ -500,7 +520,7 @@ fun.axis.one.by.one <- function(x, side, labels, cols.vec ){ plot.param.BLUP <- function(list.res, model = 'lmer.LOGLIN.ER.AD.Tf', - data.type = "all.no.log", + data.type = "all.no.log", traits = c('Wood.density', 'SLA', 'Max.height'), traits.names = c(Wood.density= 'Wood density', SLA = 'Specific leaf area', @@ -573,7 +593,7 @@ for (i in traits){ col = seq_len(nrow(param.BLUP)), cex= 1) - } + } } } par(mar=c(0, 0, 0, 0)) @@ -600,7 +620,7 @@ plot.param <- function(list.res, 'Compet x trait dissimilarity'), param.print = 1:5, col.names = fun.col.param(), - data.type = "all.no.log", + data.type = "all.no.log", col.vec, pch.vec, names.bio, @@ -682,24 +702,23 @@ return(list(fixed.biomes = param.biomes, fixed.biomes.std = std.biomes)) } +biomes.factor.selected <- function(idx.select = 4:9){ +all.fact <- factor(c("Subtropical desert", "Temperate grassland desert", "Tundra", + "Boreal forest", "Temperate forest", "Temperate rain forest", + "Tropical forest savanna", "Tropical rain forest", "Woodland shrubland")) +return(all.fact[idx.select]) +} plot.param.biomes.fixed <- function(list.res, model, biomes.names = c("Taiga", - "Desert", "Temperate forest", "Temperate rainforest", "Tropical seasonal forest", "Tropical rainforest", "Woodland/shrubland"), - biomes = c("Boreal forest", - "Temperate grassland desert", - "Temperate forest", - "Temperate rain forest", - "Tropical forest savanna", - "Tropical rain forest", - "Woodland shrubland"), + biomes = biomes.factor.selected(), traits = c('Wood.density', 'SLA', 'Max.height'), traits.names = c(Wood.density= 'Wood density', SLA = 'Specific leaf area', @@ -712,13 +731,13 @@ plot.param.biomes.fixed <- function(list.res, 'Compet x trait dissimilarity'), param.print = 1:5, col.names = fun.col.param() , - data.type = "all.no.log", + data.type = "all.no.log", col.vec, pch.vec, names.bio, ...){ col.vec[2] <- col.vec[1] - pch.vec[2:9] <- pch.vec[1:8] + biomes.c <- as.character(biomes) big.m <- 3 small.m <- 0.42 legend.m <- 2 @@ -747,12 +766,12 @@ for (i in traits){ if(n.vars == 1){ plot(param.mean, seq.jitter+n.vars, yaxt = 'n', xlab = 'Effect size ', ylab = NA, - , pch = pch.vec[biomes] , cex = 2, cex.lab = 1.5, + , pch = pch.vec[biomes.c] , cex = 2, cex.lab = 1.5, ylim = range(seq_len(length(param.vec))), - col = col.vec[biomes], ...)} + col = col.vec[biomes.c], ...)} if(n.vars != 1){ points(param.mean, seq.jitter+n.vars, - col = col.vec[biomes], pch = pch.vec[biomes], cex = 2)} + col = col.vec[biomes.c], pch = pch.vec[biomes.c], cex = 2)} mtext(traits.names[i], side=3, cex =1.2, line = 1) box(lwd= 2) abline(v = 0) @@ -764,14 +783,14 @@ for (i in traits){ } fun.plot.error.bar.horiz(param.mean, seq.jitter+n.vars, - param.std, col = col.vec[biomes]) + param.std, col = col.vec[biomes.c]) } } par(mar=c(0, 0, 0, 0)) plot(1,1,type="n", axes=F, xlab="", ylab="") -legend("center",legend = biomes, col = col.vec[biomes], - pch = pch.vec[biomes], lty =1, lwd = 2, - bty = 'n', cex = 2) +legend("center",legend = biomes.names, col = col.vec[biomes.c], + pch = pch.vec[biomes], lty =1, lwd = 1, + bty = 'n', cex = 1) } diff --git a/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species.R b/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species.R index 270ee127f1f434839ee647538a3d446194bfceac..c317a29112a3363ccc0daea7bafd6c340a6273ac 100644 --- a/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species.R +++ b/R/analysis/model.lmer/model.lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species.R @@ -1,7 +1,7 @@ load.model <- function () { list(name="lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species", var.BLUP = 'biomes.id', - lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)+(1|biomes.id)+Tf+logD+sumBn+sumTfBn+sumTnBn+sumTnTfBn.abs +(logD-1|species.id) +(sumBn-1|species.id)+(Tf-1|set.id)+(sumBn-1|set.id)+(sumTfBn-1|set.id)+(sumTnBn-1|set.id)+(sumTnTfBn.abs-1|set.id)+(Tf-1|biomes.id)+(sumBn-1|biomes.id)+(sumTfBn-1|biomes.id)+(sumTnBn-1|biomes.id)+(sumTnTfBn.abs-1|biomes.id)")) + lmer.formula.tree.id=formula("logG~1+(1|set.id)+(1|species.id)+(1|plot.id)++(1|biomes.id)+Tf+logD+sumBn+sumTfBn+sumTnBn+sumTnTfBn.abs +(logD-1|species.id) +(sumBn-1|species.id)+(Tf-1|set.id)+(sumBn-1|set.id)+(sumTfBn-1|set.id)+(sumTnBn-1|set.id)+(sumTnTfBn.abs-1|set.id)+(Tf-1|biomes.id)+(sumBn-1|biomes.id)+(sumTfBn-1|biomes.id)+(sumTnBn-1|biomes.id)+(sumTnTfBn.abs-1|biomes.id)")) } diff --git a/docs/paper/paper.md b/docs/paper/paper.md index f081656fb17390a5df4214fd34be28bcf49306d3..ff98a4c0ee7d3816354a75d729b70dc0f0261942 100644 --- a/docs/paper/paper.md +++ b/docs/paper/paper.md @@ -12,7 +12,7 @@ Competition is a very important type of ecological interaction, especially in terrestrial vegetation where plants greatly modify the local environment for each other. Competition has influence on growth of individuals and survival, on how species mixtures will change over time into the future, and on community composition. However firm generalizations have yet to be established about outcomes of competition among tree species. Here we show how key species traits have consistent influences on growth and competition. The data sources are very large, including national forest inventories monitoring growth in sometimes millions of trees, and we here synthesize across a global set of such inventories plus also several large forest-monitoring plots. Some traits have strong effect on the growth rate of the species. Then traits in part determine the tolerance to competition and the impact of the competitor. A notable generalization is that trait values that favour tolerance to competition also render species slow growing in absence of competition. There is also a small but detectable benefit in reducing competition from trait-dissimilarity between focal plant and its competitors. The trait-based picture that emerges is much simpler and more general than a quantification of competition coefficients between each pair of species, which is intractable at the global scale. Our results demonstrate that traits may be used to predict competitive interactions between forest tree species at a large scale. We anticipate that our results can have profound influence on trait model of community assembly. -# Main text +# Main text **(MAX 1500 words till the end of Methods = 1494)** @@ -146,34 +146,67 @@ analytical approach, wrote the computer code and performed analyses. +![**Figure 1 Assessing competitive interactions at global scale.** **a,** Precipitation-temperature space occupied by the natural forest communities studied. Biomes follow the definition of Whittaker [@ricklefs_economy_2001]: + 1, tundra; 2, taiga; 3, woodland/shrubland; 4, temperate forest; 5, + temperate rainforest; 6, desert; 7, tropical seasonal forest; 8, + tropical rainforest. **b,** Sampled patches vary in the density of + competitors from species $c$ around individuals from a focal species + $f$. For each tree we record the stem diameter $D_i$ across multiple + censuses, and link this with records for the traits of the focal and + competitor species, $t_f$ and $t_c$ respectively. **c,** We use a + neighbourhood modelling framework to model the effects of the traits + and the total basal area ($B_c$) and traits of competitor species on + growth of the focal tree. These effects can be broken down into those + influencing potential growth rate (maximum growth red) and reductions in growth per unit basal area of competitor (blue), $\alpha_{c,f}$. Trait value of focal tree ($t_f$) can influences the tree growth without competition (maximum growth, $m_1$). The trait value of the focal tree can influences its tolerance to competition ($t_f \, \alpha_r$) and the trait values of the competitors can influence their competitive impact ($t_c \, \alpha_i$). Finally, the trait similarity between the focal tree and its competitors can influences competitive interactions ($\alpha_s \, \vert t_c-t_f \vert$) (see extended methods). The parameters $m_1, \alpha_0, \alpha_i, \alpha_r$ and $\alpha_s$ are fitted from data. \label{ilustr}](image/fig1eb.pdf) +\newpage + +**OR** +![**Figure 1 Assessing competitive interactions at global scale.** **a,** Precipitation-temperature space occupied by the natural forest communities studied. Biomes follow the definition of Whittaker [@ricklefs_economy_2001]: + 1, tundra; 2, taiga; 3, woodland/shrubland; 4, temperate forest; 5, + temperate rainforest; 6, desert; 7, tropical seasonal forest; 8, + tropical rainforest. **b,** Sampled patches vary in the density of + competitors from species $c$ around individuals from a focal species + $f$. For each tree we record the stem diameter $D_i$ across multiple + censuses, and link this with records for the traits of the focal and + competitor species, $t_f$ and $t_c$ respectively. **c,** We use a + neighbourhood modelling framework to model the effects of the traits + and size of the focal tree, and the total basal area ($B_c$) and + traits of competitor species on growth of the focal tree. These + effects can be broken down into those influencing potential growth + rate (maximum growth red) and reductions in growth per unit basal area of competitor (blue), $\alpha_{c,f}$. Trait value of focal tree ($t_f$) can influences the tree growth without competition (maximum growth, $m_1$). The trait value of the focal tree can influences its tolerance to competition ($t_f \, \alpha_r$) and the trait values of the competitors can influence their competitive impact ($t_c \, \alpha_i$). Finally, the trait similarity between the focal tree and its competitors can influences competitive interactions ($\alpha_s \, \vert t_c-t_f \vert$) (see extended methods). The parameters $m_0, m_1, \gamma, \alpha_0, \alpha_i, \alpha_r$ and $\alpha_s$ are fitted from data. \label{ilustr2}](image/fig1e.pdf) -![**Figure 1 Assessing competitive interactions at global scale.** **a,** Precipitation-temperature space occupied by the natural forest communities studied. Biome definitions of Whittaker [@ricklefs_economy_2001]: 1, tundra; 2, taiga; 3, woodland/shrubland; 4, temperate forest; 5, temperate rainforest; 6, desert; 7, tropical seasonal forest; 8, tropical rainforest. **b,** Sampled patches vary in the density of competitors from species $c$ around individuals from a focal species $f$. For each tree we record the stem diameter $D_i$ across multiple censuses, and link this with records for the traits of the focal and competitor species, $t_f$ and $t_c$ respectively. **c,** We use a neighbourhood modelling framework to model the effects of the traits and the total basal area ($B_c$) and traits of competitor species on growth of the focal tree. These effects can be broken down into those influencing potential growth rate (red) and reductions in growth per unit basal area of competitor (blue), $\alpha_{c,f}$. Trait value of focal tree ($t_f$) can influences the tree growth without competition (maximum growth, $m_1$). The trait value of the focal tree can influences its tolerance to competition ($t_f \, \alpha_r$) and the trait values of the competitors can influence their competitive impact ($t_c \, \alpha_i$). Finally, the trait similarity between the focal tree and its competitors can influences competitive interactions ($\alpha_s \, \vert t_c-t_f \vert$) (see extended methods). The parameters $m_1, \alpha_0, \alpha_i, \alpha_r$ and $\alpha_s$ are fitted from data. \label{ilustr}](image/fig1eb.pdf) +\newpage **COMMENT: NOT SURE THE BLACK ELLIPSE ARE THE BEST WAY TO REPRESENT THE DATA. May be have different colors per ellipse per data set?? such as the one in the follwing figure**  -**OR** +\newpage -![**Figure 1 Assessing competitive interactions at global scale.** **a,** Precipitation-temperature space occupied by the natural forest communities studied. Biome definitions of Whittaker [@ricklefs_economy_2001]: 1, tundra; 2, taiga; 3, woodland/shrubland; 4, temperate forest; 5, temperate rainforest; 6, desert; 7, tropical seasonal forest; 8, tropical rainforest. **b,** Sampled patches vary in the density of competitors from species $c$ around individuals from a focal species $f$. For each tree we record the stem diameter $D_i$ across multiple censuses, and link this with records for the traits of the focal and competitor species, $t_f$ and $t_c$ respectively. **c,** We use a neighbourhood modelling framework to model the effects of the traits and size of the focal tree, and the total basal area ($B_c$) and traits of competitor species on growth of the focal tree. These effects can be broken down into those influencing potential growth rate (red) and reductions in growth per unit basal area of competitor (blue), $\alpha_{c,f}$. Trait value of focal tree ($t_f$) can influences the tree growth without competition (maximum growth, $m_1$). The trait value of the focal tree can influences its tolerance to competition ($t_f \, \alpha_r$) and the trait values of the competitors can influence their competitive impact ($t_c \, \alpha_i$). Finally, the trait similarity between the focal tree and its competitors can influences competitive interactions ($\alpha_s \, \vert t_c-t_f \vert$) (see extended methods). The parameters $m_0, m_1, \gamma, \alpha_0, \alpha_i, \alpha_r$ and $\alpha_s$ are fitted from data. \label{ilustr2}](image/fig1e.pdf) + + \newpage - + -\newpage +\newpage + - -\newpage - +<!-- # POINTS TO DISCUSS WITH DANIEL --> - +<!-- 1. Fig 1 include size effect or not. Size effect is not interesting --> +<!-- here. --> +<!-- 2. set on biomes ? --> +<!-- 3. Split param between trait and not trait? The comparison of trait --> +<!-- effect and mean comp is interesting. --> +<!-- 4. Biomes effect ..... --> diff --git a/scripts/analysis/results.fig.R b/scripts/analysis/results.fig.R index b8651b1f28b96acb0d88a95457dcc457a9ecb935..48736b6d353b9e7a9470685c243e6fdf2a0c2bc9 100644 --- a/scripts/analysis/results.fig.R +++ b/scripts/analysis/results.fig.R @@ -50,68 +50,169 @@ dev.off() ## load results -list.all.results.species.id.set <- +list.all.results.biomes.id.set <- readRDS('output/list.lmer.out.all.biomes.set.simple.wwf.rds') +list.all.results.species.id.set <- + readRDS('output/list.lmer.out.all.sp.set.simple.wwf.rds') + -fun.get.conv(list.all.results.species.id.set) -vec.rel.grad.species.id.set <- sapply(list.all.results.species.id.set, +fun.get.conv(list.all.results.biomes.id.set) +vec.rel.grad.biomes.id.set <- sapply(list.all.results.biomes.id.set, function(list.t) { max(abs(list.t[['relgrad']]))}) -vec.rel.grad.species.id.set < 0.001 +vec.rel.grad.biomes.id.set < 0.001 # Figmean -pdf('figs/FIG.MEAN.pdf', height = 7, width = 14) +pdf('figs/figres1.pdf', height = 7, width = 14) +plot.param(list.all.results.biomes.id.set , data.type = "simple", + model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species', + traits = c('Wood.density', 'SLA', 'Max.height'), + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), + param.names = c(expression(paste('Compet trait simil ', + (alpha[l] %*% abs(t[n] - t[f])))), + expression(paste('Compet response ', + (alpha[r] %*% t[f]))), + expression(paste('Compet impact ', + (alpha[i] %*% t[c]))), + expression(paste('Compet trait indep ', + (alpha[0]))), + expression(paste("Direct trait effect ", + (m[1] %*% t[f])))) , + col.vec = fun.col.pch.biomes()$col.vec, + pch.vec = fun.col.pch.biomes()$pch.vec, + names.bio = names.biomes , + xlim = c(-0.5, 0.3)) +dev.off() + +pdf('figs/figres1b.pdf', height = 7, width = 14) +plot.param(list.all.results.biomes.id.set , data.type = "simple", + model = 'lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species', + traits = c('Wood.density', 'SLA', 'Max.height'), + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), + param.names = c(expression(paste('Compet trait simil ', + (alpha[l] %*% abs(t[n] - t[f])))), + expression(paste('Compet response ', + (alpha[r] %*% t[f]))), + expression(paste('Compet impact ', + (alpha[i] %*% t[c]))), + expression(paste('Compet trait indep ', + (alpha[0]))), + expression(paste("Direct trait effect ", + (m[1] %*% t[f])))) , + col.vec = fun.col.pch.biomes()$col.vec, + pch.vec = fun.col.pch.biomes()$pch.vec, + names.bio = names.biomes , + xlim = c(-0.65, 0.3)) +dev.off() + + +pdf('figs/figresBLUP1.pdf', height = 7, width = 14) +plot.param.BLUP(list.all.results.biomes.id.set , data.type = "simple", + model = 'lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species', + traits = c('Wood.density', 'SLA', 'Max.height'), + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), + param.names = c(expression(paste('Compet trait simil ', + (alpha[l] %*% abs(t[n] - t[f])))), + expression(paste('Compet response ', + (alpha[r] %*% t[f]))), + expression(paste('Compet impact ', + (alpha[i] %*% t[c]))), + expression(paste('Compet trait indep ', + (alpha[0]))), + expression(paste("Direct trait effect ", + (m[1] %*% t[f])))) , + col.vec = fun.col.pch.biomes()$col.vec, + pch.vec = fun.col.pch.biomes()$pch.vec, + names.bio = names.biomes , + xlim = c(-0.65, 0.3), biomes.TF = TRUE) +dev.off() + + +pdf('figs/figressp1.pdf', height = 7, width = 14) plot.param(list.all.results.species.id.set , data.type = "simple", model = 'lmer.LOGLIN.ER.AD.Tf.r.set.species', traits = c('Wood.density', 'SLA', 'Max.height'), - param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn","sumBn", "Tf"), + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), + param.names = c(expression(paste('Compet trait simil ', + (alpha[l] %*% abs(t[n] - t[f])))), + expression(paste('Compet response ', + (alpha[r] %*% t[f]))), + expression(paste('Compet impact ', + (alpha[i] %*% t[c]))), + expression(paste('Compet trait indep ', + (alpha[0]))), + expression(paste("Direct trait effect ", + (m[1] %*% t[f])))) , + col.vec = fun.col.pch.biomes()$col.vec, + pch.vec = fun.col.pch.biomes()$pch.vec, + names.bio = names.biomes , + xlim = c(-0.5, 0.3)) +dev.off() + +pdf('figs/figressp1b.pdf', height = 7, width = 14) +plot.param(list.all.results.species.id.set , data.type = "simple", + model = 'lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species', + traits = c('Wood.density', 'SLA', 'Max.height'), + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), param.names = c(expression(paste('Compet trait simil ', (alpha[l] %*% abs(t[n] - t[f])))), expression(paste('Compet response ', (alpha[r] %*% t[f]))), expression(paste('Compet impact ', (alpha[i] %*% t[c]))), - expression(paste('Compet trait indep ', (alpha[0]))), + expression(paste('Compet trait indep ', + (alpha[0]))), expression(paste("Direct trait effect ", (m[1] %*% t[f])))) , col.vec = fun.col.pch.biomes()$col.vec, pch.vec = fun.col.pch.biomes()$pch.vec, names.bio = names.biomes , - xlim = c(-0.5, 0.31)) + xlim = c(-0.65, 0.3)) dev.off() +pdf('figs/figresspBLUP1.pdf', height = 7, width = 14) plot.param.BLUP(list.all.results.species.id.set , data.type = "simple", model = 'lmer.LOGLIN.ER.AD.Tf.r.set.biomes.species', traits = c('Wood.density', 'SLA', 'Max.height'), - param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn","sumBn", "Tf"), + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), param.names = c(expression(paste('Compet trait simil ', (alpha[l] %*% abs(t[n] - t[f])))), expression(paste('Compet response ', (alpha[r] %*% t[f]))), expression(paste('Compet impact ', (alpha[i] %*% t[c]))), - expression(paste('Compet trait indep ', (alpha[0]))), + expression(paste('Compet trait indep ', + (alpha[0]))), expression(paste("Direct trait effect ", (m[1] %*% t[f])))) , col.vec = fun.col.pch.biomes()$col.vec, pch.vec = fun.col.pch.biomes()$pch.vec, names.bio = names.biomes , - xlim = c(-0.42, 0.18), biomes.TF = TRUE) + xlim = c(-0.65, 0.3), biomes.TF = TRUE) +dev.off() + -pdf('figs/FIG.MEAN.BIOMES.pdf', height = 7, width = 14) -plot.param.biomes.fixed(list.all.results.species.id.set, data.type = 'simple', - model = 'lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species', - biomes = names(fun.col.pch.biomes()$col.vec), - param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn","sumBn", "Tf"), +pdf('figs/figres2.pdf', height = 7, width = 14) +plot.param.biomes.fixed(list.all.results.biomes.id.set, data.type = 'simple', + model = 'lmer.LOGLIN.ER.AD.Tf.r.set.fixed.biomes.species', + param.vec = c("sumTnTfBn.abs", "sumTnBn", "sumTfBn", + "sumBn", "Tf"), param.names = c(expression(paste('Compet trait simil ', (alpha[l] %*% abs(t[n] - t[f])))), expression(paste('Compet response ', (alpha[r] %*% t[f]))), expression(paste('Compet impact ', (alpha[i] %*% t[c]))), - expression(paste('Compet trait indep ', (alpha[0]))), + expression(paste('Compet trait indep ', + (alpha[0]))), expression(paste("Direct trait effect ", (m[1] %*% t[f])))) , col.vec = fun.col.pch.biomes()$col.vec, @@ -129,7 +230,7 @@ plot.growth.ba(traits = c('Wood.density', 'SLA', 'Max.height'), type = 'Tabs', data.type = 'simple', dir.root = '.', list.res = list.all.results.species.id.set, - labels.leg = c('High trait value', 'Low trait value')) + labels.leg = c('High trait value', 'Low trait value')) dev.off()