Commit 15110b8a authored by kunstler's avatar kunstler
Browse files

start rev add japan

parent 73ebd6b1
......@@ -202,7 +202,7 @@ segments( unlist(x + 1.96*sd), y-small.bar, unlist(x +1.96*sd), y+small.bar, .
}
fun.col.param <- function(){
t.col <- c('black', '#e41a1c', '#377eb8',
t.col <- c('black', '#e41a1c', '#377eb8',
'#984ea3', '#4daf4a', '#ff7f00')
names(t.col) <- c('logD', "Tf","sumBn", "sumTnBn",
"sumTfBn", "sumTnTfBn.abs")
......@@ -462,15 +462,16 @@ for (i in traits){
}
dat.res <- data.frame(do.call('rbind', list.df),
traits = rep(traits, each = 2*N.pred))
dat.res <- change.traits.levels(dat.res)
dat.res <- change.traits.levels(dat.res, traits)
return(dat.res)
}
change.traits.levels <- function(df,
change.traits.levels <- function(df, traits,
traits.names = fun.traits.names()){
df$traits <- factor(df$traits, levels = traits)
levels(df$traits) <- traits.names[levels(df$traits)]
return(df)
}
}
theme_simple <- function(){
theme_bw() +
......@@ -630,6 +631,7 @@ plot.param <- function(list.res,
'Compet response x trait',
'Compet x trait dissimilarity'),
param.print = 1:5,
traits.print = 1:3,
col.names = fun.col.param(),
data.type = "all.no.log",
col.vec,
......@@ -637,12 +639,12 @@ plot.param <- function(list.res,
names.bio,
...){
m <- matrix(c(1:3), 1, 3)
big.m <- 3
big.m <- 2.8
small.m <- 0.42
wid <- c(big.m ,0, small.m) +
rep((14-big.m-small.m)/3, each= 3)
layout(m, widths=wid)
for (i in traits){
for (i in traits[traits.print]){
list.temp <- list.res[[paste(data.type, "_", i ,
"_", model,
sep = '')]]$lmer.summary
......@@ -652,12 +654,12 @@ for (i in traits){
param.std <- param.std[param.vec]
param.BLUP <- list.temp$set.BLUP
if(i == traits[1]) {
par(mai=c(1.2, big.m,0.6,0))
par(mai=c(1.2, big.m,0.6,0), xpd = TRUE)
}else{
par(mai=c(1.2,0,0.6,0))
par(mai=c(1.2,0,0.6,0), xpd = TRUE)
}
if(i == traits[length(traits)]) {
par(mai=c(1.2,0,0.6,small.m))
par(mai=c(1.2,0,0.6,small.m), xpd = TRUE)
}
plot(param.mean[param.print], (1:length(param.vec))[param.print],
yaxt = 'n', xlab = NA, ylab = NA,
......@@ -667,12 +669,16 @@ for (i in traits){
if(i == traits[2]) mtext('Standardized coefficients', side=1, cex =1.7,
line = 4)
box(lwd= 2)
abline(v = 0)
lines(c(0, 0), c(1-0.2, length(param.vec)+0.2))
if(i == traits[1]) {lapply(1:length(param.vec),
fun.axis.one.by.one,
side = 2,
labels = param.names,
cols.vec = col.names[param.vec])
mtext("Max growth", side=2, at = 5.5, cex =1.6, line = 17.5, col = '#e41a1c')
lines(c(-1.07, -1.07), c(4.75, 6.15), col = '#e41a1c', lwd = 2.5)
mtext("Competition", side=2, at = 2.5, cex =1.6, line = 17.5, col = '#377eb8')
lines(c(-1.07, -1.07), c(0.85, 4.15), col = '#377eb8', lwd = 2.5)
}
fun.plot.error.bar.horiz(param.mean[param.print],
(1:length(param.vec))[param.print],
......@@ -758,7 +764,7 @@ levels.name[levels.name == 'Tundra'] <- 'Boreal forest'
levels.name[levels.name == 'Subtropical desert'] <- 'Temperate grassland desert'
levels.name[levels.name == "Tropical rain forest"] <- "Tropical forest savanna"
levels(all.fact) <- levels.name
return(all.fact[idx.select])
}
......@@ -789,22 +795,37 @@ plot.param.biomes.fixed <- function(list.res,
'Compet effect x trait',
'Compet response x trait',
'Compet x trait dissimilarity'),
param.print = 1:5,
col.names = fun.col.param() ,
data.type = "all.no.log",
col.vec,
pch.vec,
names.bio,
param.print = 1:5,
col.names = fun.col.param() ,
data.type = "all.no.log",
col.vec,
pch.vec,
names.bio,
legend.pos = 1,
...){
col.vec[2] <- col.vec[1]
biomes.c <- as.character(biomes)
big.m <- 3.1
big.m <- 3.0
small.m <- 0
legend.m <- 1.9
if (legend.pos==1){
wid <- c(big.m ,0, small.m) +
rep((14-big.m-small.m-legend.m)/3, each= 3)
m <- matrix(c(1:4), 1, 4)
layout(m, widths=c(wid, legend.m))
}
if (legend.pos==2){
wid <- c(big.m ,0, small.m) +
rep((14-big.m-small.m)/3, each= 3)
m <- matrix(c(1:3, 4, 4, 4), 2, 3, byrow = TRUE)
layout(m, widths=c(wid), height = c(5,1))
}
if(legend.pos==0) {
wid <- c(big.m ,0, small.m) +
rep((14-big.m-small.m)/3, each= 3)
m <- matrix(c(1:3), 1, 3)
layout(m, widths=c(wid))
}
for (i in traits){
list.temp <- list.res[[paste0(data.type, "_", i ,
"_", model)]]
......@@ -815,19 +836,19 @@ for (i in traits){
param.mean <- list.fixed$fixed.biomes
param.std <- list.fixed$fixed.biomes.std
if(i == traits[1]) {
par(mai=c(1.2, big.m,0.6,0))
par(mai=c(0.8, big.m,0.6,0), xpd = TRUE)
}else{
par(mai=c(1.2,0,0.6,0))
par(mai=c(0.8,0,0.6,0), xpd = TRUE)
}
if(i == traits[length(traits)]) {
par(mai=c(1.2,0,0.6,small.m))
par(mai=c(0.8,0,0.6,small.m), xpd = TRUE)
}
seq.jitter <- seq(25, -25, length.out = length(biomes))/120
if(n.vars == 1){
plot(param.mean, seq.jitter+n.vars,
yaxt = 'n', xlab = NA, ylab = NA,
, pch = pch.vec[biomes.c] , cex = 2, cex.axis = 1.5, cex.lab = 1.5,
ylim = range(1-0.15, length(param.vec)+0.15),
ylim = range(1-0.21, length(param.vec)+0.21),
col = col.vec[biomes.c], ...)
if(i == traits[2]) mtext('Standardized coefficients', side=1, cex =1.5,
line = 4)
......@@ -837,24 +858,37 @@ for (i in traits){
col = col.vec[biomes.c], pch = pch.vec[biomes.c], cex = 2)}
mtext(traits.names[i], side=3, cex =1.5, line = 1)
box(lwd= 2)
abline(v = 0)
lines(c(0, 0), c(1-0.35, length(param.vec)+0.35), lwd= 1)
if(i == traits[1]) {lapply(1:length(param.vec),
fun.axis.one.by.one,
side = 2,
labels = param.names,
cols.vec = col.names[param.vec],
cex.axis = 2.1)
mtext("Max growth", side=2, at = 4, cex =1.6, line = 17.9, col = '#e41a1c')
lines(c(-0.645, -0.645), c(3.7, 4.3), col = '#e41a1c', lwd = 2.5)
mtext("Competition", side=2, at = 2, cex =1.6, line = 17.9, col = '#377eb8')
lines(c(-0.645, -0.645), c(0.72, 3.28), col = '#377eb8', lwd = 2.5)
}
fun.plot.error.bar.horiz(param.mean,
seq.jitter+n.vars,
param.std, col = col.vec[biomes.c])
}
}
par(mar=c(0, 0, 0, 0))
plot(1,1,type="n", axes=FALSE, xlab="", ylab="")
legend(0.6 , 1.1, legend = biomes.names[biomes.c], col = col.vec[biomes.c],
pch = pch.vec[biomes.c], lty =1, lwd = 1.5,
bty = 'n', cex = 1.55)
if (legend.pos == 1){
par(mar=c(0, 0, 0, 0))
plot(1,1,type="n", axes=FALSE, xlab="", ylab="")
legend(0.6 , 1.1, legend = biomes.names[biomes.c], col = col.vec[biomes.c],
pch = pch.vec[biomes.c], lty =1, lwd = 1.5,
bty = 'n', cex = 1.55)
}
if (legend.pos == 2){
par(mar=c(0, 0, 0, 0))
plot(1,1,type="n", axes=FALSE, xlab="", ylab="")
legend(0.9 , 1.5, legend = biomes.names[biomes.c], col = col.vec[biomes.c],
pch = pch.vec[biomes.c], lty =1, lwd = 1.7,
bty = 'n', cex = 2, ncol = 2, xpd = TRUE)
}
}
......
......@@ -82,8 +82,7 @@ run.lmer <- function (model.file, trait,
data.type ='simple',
var.sample = NA,
select.biome = NA,
merge.biomes.TF = FALSE,
select.one.census = TRUE) {
merge.biomes.TF = FALSE) {
require(lme4)
source(model.file, local = TRUE)
model <- load.model()
......@@ -101,8 +100,7 @@ run.lmer <- function (model.file, trait,
Multi.type. = Multi.type,
var.sample. = var.sample,
select.biome. = select.biome,
merge.biomes.TF = merge.biomes.TF,
select.one.census. = select.one.census)
merge.biomes.TF = merge.biomes.TF)
# return a list of DF
cat("Ok data with Nobs", nrow(list.df.lmer[[1]]),
"\n")
......@@ -158,9 +156,9 @@ load.data.for.lmer <- function(trait, data.type,
select.biome. = NA,
select.set. = NA,
sample.vec.TF. = FALSE,
merge.biomes.TF = FALSE,
select.one.census. = TRUE){
merge.biomes.TF = FALSE){
require(dplyr)
if (! data.type %in% c('simple', 'Multi', 'all.census')) stop('not good data.type')
if (data.type == 'Multi'){
df <- readRDS(file.path(base.dir,paste('data', 'Multi', data.type, 'rds',
sep = '.')))
......@@ -172,7 +170,7 @@ load.data.for.lmer <- function(trait, data.type,
sp.name))
if(merge.biomes.TF) df <- merge.biomes(df)
if(!is.na(select.one.census.)) {
if(data.type != 'all.census') {
df <- select.one.census.per.plot(df)
}
if(!is.na(select.biome.)) {
......@@ -317,7 +315,7 @@ load.and.save.data.for.lmer <- function(trait,
Multi.type = 'a',
base.dir = "output/processed"){
fname <- switch(data.type, 'simple' = 'data.all.no.log.all.census.rds',
'cat' = 'data.all.no.log.all.census.rds',
'all.census' = 'data.all.no.log.all.census.rds',
'Multi' = 'data.all.global.all.census.rds')
data.tree.tot <- readRDS(file.path(base.dir, fname))
if (data.type == 'Multi'){
......
......@@ -115,9 +115,12 @@ if (nrow(xy)>10){
fun.perc.ref <- function(data.TRY.std, all.traits, var){
select.try <- sapply(data.TRY.std$Latin_name,fun.get.genus) %in%
data.try <- data.TRY.std[!(is.na(data.TRY.std$SLA) &
is.na(data.TRY.std$Wood.density) &
is.na(data.TRY.std$height)),]
select.try <- sapply(data.try$Latin_name,fun.get.genus) %in%
sapply(all.traits$Latin_name,fun.get.genus)
vec.ref.used <- data.TRY.std[[var]][select.try]
vec.ref.used <- data.try[[var]][select.try]
perc.ref <- sort(table(vec.ref.used) / length(vec.ref.used) )
print(names(perc.ref)[perc.ref > 0.005])
......
......@@ -22,18 +22,69 @@ to.dev <- function(expr, dev, filename, ..., verbose=TRUE){
na.clean <-function(x){x[!is.na(x)]}
## FROM https://gist.github.com/johnbaums/45b49da5e260a9fc1cd7
swatch <- function(x) {
# x: a vector of colours (hex, numeric, or string)
par(mai=c(0.2, max(strwidth(x, "inch") + 0.4, na.rm = TRUE), 0.2, 0.4))
barplot(rep(1, length(x)), col=rev(x), space = 0.1, axes=FALSE,
names.arg=rev(x), cex.names=0.8, horiz=T, las=1)
}
# Example:
# swatch(colours()[1:10])
# swatch(iwanthue(14))
# swatch(1:4)
iwanthue <- function(n, hmin=0, hmax=360, cmin=0, cmax=180, lmin=0, lmax=100,
plot=FALSE) {
# Presently doesn't allow hmax > hmin (H is circular)
# n: number of colours
# hmin: lower bound of hue (0-360)
# hmax: upper bound of hue (0-360)
# cmin: lower bound of chroma (0-180)
# cmax: upper bound of chroma (0-180)
# lmin: lower bound of lightness (0-100)
# lmax: upper bound of lightness (0-100)
# plot: plot a colour swatch?
require(colorspace)
stopifnot(hmin >= 0, cmin >= 0, lmin >= 0,
hmax <= 360, cmax <= 180, lmax <= 100,
hmin <= hmax, cmin <= cmax, lmin <= lmax,
n > 0)
lab <- LAB(as.matrix(expand.grid(seq(0, 100, 1),
seq(-100, 100, 5),
seq(-110, 100, 5))))
if (any((hmin != 0 || cmin != 0 || lmin != 0 ||
hmax != 360 || cmax != 180 || lmax != 100))) {
hcl <- as(lab, 'polarLUV')
hcl_coords <- coords(hcl)
hcl <- hcl[which(hcl_coords[, 'H'] <= hmax & hcl_coords[, 'H'] >= hmin &
hcl_coords[, 'C'] <= cmax & hcl_coords[, 'C'] >= cmin &
hcl_coords[, 'L'] <= lmax & hcl_coords[, 'L'] >= lmin), ]
#hcl <- hcl[-which(is.na(coords(hcl)[, 2]))]
lab <- as(hcl, 'LAB')
}
lab <- lab[which(!is.na(hex(lab))), ]
clus <- kmeans(coords(lab), n, iter.max=50)
if (isTRUE(plot)) {
swatch(hex(LAB(clus$centers)))
}
hex(LAB(clus$centers))
}
#returns up to 80 unique, nice colors,
#generated using http://tools.medialab.sciences-po.fr/iwanthue/
# Starts repeating after 80
niceColors<-function(n=80){
cols<-rep(c("#75954F","#D455E9","#E34423","#4CAAE1","#451431","#5DE737",
cols<-rep(c("#DF3565","#D455E9","#E34423","#4CAAE1","#451431","#5DE737",
"#DC9B94","#DC3788","#E0A732","#67D4C1","#5F75E2","#1A3125",
"#65E689","#A8313C","#8D6F96","#5F3819","#D8CFE4","#BDE640",
"#DAD799","#D981DD","#61AD34","#B8784B","#892870","#445662",
"#493670","#3CA374","#E56C7F","#5F978F","#BAE684","#DB732A",
"#7148A8","#867927","#918C68","#98A730","#DDA5D2","#456C9C",
"#2B5024","#E4D742","#D3CAB6","#946661","#9B66E3","#AA3BA2",
"#A98FE1","#9AD3E8","#5F8FE0","#DF3565","#D5AC81","#6AE4AE",
"#A98FE1","#9AD3E8","#5F8FE0","#75954F","#D5AC81","#6AE4AE",
"#652326","#575640","#2D6659","#26294A","#DA66AB","#E24849",
"#4A58A3","#9F3A59","#71E764","#CF7A99","#3B7A24","#AA9FA9",
"#DD39C0","#604458","#C7C568","#98A6DA","#DDAB5F","#96341B",
......@@ -44,6 +95,14 @@ niceColors<-function(n=80){
cols[1:n]
}
niceColors2<-function(n=20){
cols<-rep(c("#FFB300", "#803E75", "#FF6800", "#A6BDD7", "#C10020", "#CEA262",
"#817066", "#007D34", "#F6768E", "#00538A", "#FF7A5C", "#53377A",
"#FF8E00", "#B32851", "#F4C800","#7F180D", "#93AA00", "#593315",
"#F13A13", "#232C16"),
ceiling(n/20))
cols[1:n]
}
make.transparent <- function(col, opacity=0.5) {
tmp <- col2rgb(col)/255
......@@ -64,6 +123,16 @@ return(list(col.vec = col.vec,
pch.vec = pch.vec))
}
fun.lty.set <- function(){
sets <- c("BCI","Canada","France","Fushan","Japan","Luquillo","Mbaiki",
"NSW","NVS","Paracou",
"Spain","Sweden","Swiss","US")
lty.vec <- c(2, 1, 1, 2, 2, 2, 2, 1, 1, 2, 1, 1, 1, 1)
names(lty.vec) <- sets
return(list(lty.vec = lty.vec))
}
## biomes
fun.col.pch.biomes <- function(){
col.vec.biomes <- make.transparent(c("navajowhite3", "darkgoldenrod1",
......@@ -300,7 +369,7 @@ plot.points.on.biome.map(MAP[j], MAT[j], set[j], cols = cols[sets[i]])
plot.ellips.on.biome.map <- function(MAP, MAT, set,
cols = fun.col.pch.set()$col.vec,
lty.vec = fun.col.pch.set()$pch.vec,
lty.vec = fun.lty.set()$lty.vec,
...){
require(BIOMEplot)
plot_biome(...)
......@@ -313,7 +382,7 @@ plot.ellips.on.biome.map <- function(MAP, MAT, set,
fun.ellipsoid.hull <- function(set, x, y, sets.v,
col.vec = fun.col.pch.set()$col.vec,
lty.vec = fun.col.pch.set()$pch.vec){
lty.vec = fun.lty.set()$lty.vec){
require(cluster)
xy <- cbind(x[sets.v==set], y[sets.v==set])
......@@ -322,7 +391,7 @@ if (nrow(xy)>10){
xy <- xy[xy[, 1]>quantile(xy[, 1], 0.01) &xy[, 1]<quantile(xy[, 1], 0.99) &
xy[, 2]>quantile(xy[, 2], 0.01) &xy[, 2]<quantile(xy[, 2], 0.99), ]
exy <- ellipsoidhull(xy)
lines(predict(exy), col = col.vec[set], lwd = 3)
lines(predict(exy), col = col.vec[set], lwd = 3, lty = lty.vec[set])
}else{
points(x[sets.v==set], y[sets.v==set] , col = col.vec[set],
cex = 2.5, pch = 16)
......
id,citation
1,"Kooyman, R.M. and Westoby, M. (2009) Costs of height gain in rainforest saplings: main stem scaling, functional traits and strategy variation across 75 species. Annals of Botany 104: 987-993."
2,"Kooyman, R.M., Rossetto, M., Allen, C. and Cornwell, W. (2012) Australian tropical and sub-tropical rainforest: phylogeny, functional biogeography and environmental gradients. Biotropica 44: 668-679."
3,"Condit, R. 1998. Tropical forest census plots. Springer, Berlin, Germany."
4,"Condit, R., Engelbrecht, B.M.J., Pino, D., Perez, R., Turner, B.L., 2013. Species distributions in response to individual soil nutrients and seasonal drought across a community of tropical trees. Proceedings of the National Academy of Sciences 110, 5064-5068."
5,"Yakushima Forest Environment Conservation Center, Ishihara, M.I., Suzuki, S.N., Nakamura, M., Enoki, T., Fujiwara, A., Hiura, T., Homma, K., Hoshino, D., Hoshizaki, K., Ida, H., Ishida, K., Itoh, A., Kaneko, T., Kubota, K., Kuraji, K., Kuramoto, S., Makita, A., Masaki, T., Namikawa, K., Niiyama, K., Noguchi, M., Nomiya, H., Ohkubo, T., Saito, S., Sakai, T., Sakimoto, M., Sakio, H., Shibano, H., Sugita, H., Suzuki, M., Takashima, A., Tanaka, N., Tashiro, N., Tokuchi, N., Yoshida, T., Yoshida, Y., 2011. Forest stand structure, composition, and dynamics in 34 sites over Japan. Ecological Research 26, 1007-1008. "
6,"Thompson, J., N. Brokaw, J. K. Zimmerman, R. B. Waide, E. M. Everham III, D. J. Lodge, C. M. Taylor, D. GarciaMontiel, and M. Fluet. 2002. Land use history, environment, and tree composition in a tropical forest. Ecological Applications 12:1344-1363."
7,"Ouadraogo, D.-Y., Mortier, F., Gourlet-Fleury, S., Freycon, V., and Picard, N. (2013). Slow-growing species cope best with drought: evidence from long-term measurements in a tropical semi-deciduous moist forest of Central Africa. Journal of Ecology 101, 14591470."
8,"Gourlet-Fleury, S., Rossi, V., Rejou-Mechain, M., Freycon, V., Fayolle, A., Saint-Andre, L., Cornu, G., Gérard, J., Sarrailh, J.-M., Flores, O., et al. (2011). Environmental filtering of dense-wooded species controls above-ground biomass stored in African moist forests. Journal of Ecology 99, 981-990."
9,"Lasky, J.R., Sun, I., Su, S.-H., Chen, Z.-S., and Keitt, T.H. (2013). Trait-mediated effects of environmental filtering on tree community dynamics. Journal of Ecology 101, 722-733."
10,"Herault, B., Bachelot, B., Poorter, L., Rossi, V., Bongers, F., Chave, J., Paine, C.E., Wagner, F., and Baraloto, C. (2011). Functional traits shape ontogenetic growth trajectories of rain forest tree species. Journal of Ecology 99, 1431-1440."
11,"Herault, B., Ouallet, J., Blanc, L., Wagner, F., and Baraloto, C. (2010). Growth responses of neotropical trees to logging gaps. Journal of Applied Ecology 47, 821-831."
3,"Condit, R. (1998). Tropical forest census plots. Springer, Berlin, Germany."
4,"Condit, R., Engelbrecht, B.M.J., Pino, D., Perez, R., Turner, B.L., (2013). Species distributions in response to individual soil nutrients and seasonal drought across a community of tropical trees. Proceedings of the National Academy of Sciences 110: 5064-5068."
5,"Yakushima Forest Environment Conservation Center, Ishihara, M.I., Suzuki, S.N., Nakamura, M., Enoki, T., Fujiwara, A., Hiura, T., Homma, K., Hoshino, D., Hoshizaki, K., Ida, H., Ishida, K., Itoh, A., Kaneko, T., Kubota, K., Kuraji, K., Kuramoto, S., Makita, A., Masaki, T., Namikawa, K., Niiyama, K., Noguchi, M., Nomiya, H., Ohkubo, T., Saito, S., Sakai, T., Sakimoto, M., Sakio, H., Shibano, H., Sugita, H., Suzuki, M., Takashima, A., Tanaka, N., Tashiro, N., Tokuchi, N., Yoshida, T., Yoshida, Y., (2011). Forest stand structure, composition, and dynamics in 34 sites over Japan. Ecological Research 26: 1007-1008. "
6,"Thompson, J., N. Brokaw, J. K. Zimmerman, R. B. Waide, E. M. Everham III, D. J. Lodge, C. M. Taylor, D. GarciaMontiel, and M. Fluet. (2002). Land use history, environment, and tree composition in a tropical forest. Ecological Applications 12: 1344-1363."
7,"Ouadraogo, D.-Y., Mortier, F., Gourlet-Fleury, S., Freycon, V., and Picard, N. (2013). Slow-growing species cope best with drought: evidence from long-term measurements in a tropical semi-deciduous moist forest of Central Africa. Journal of Ecology 101: 1459-1470."
8,"Gourlet-Fleury, S., V. Rossi, M. Rejou-Mechain, V. Freycon, A. Fayolle, L. Saint-Andr, G. Cornu, J. Gerard, J. M. Sarrailh, and O. Flores. (2011). Environmental Filtering of Dense-Wooded Species Controls above-Ground Biomass Stored in African Moist Forests. Journal of Ecology 99: 981-90."
9,"Lasky, J.R., Sun, I., Su, S.-H., Chen, Z.-S., and Keitt, T.H. (2013). Trait-mediated effects of environmental filtering on tree community dynamics. Journal of Ecology 101: 722-733."
10,"Herault, B., Bachelot, B., Poorter, L., Rossi, V., Bongers, F., Chave, J., Paine, C.E., Wagner, F., and Baraloto, C. (2011). Functional traits shape ontogenetic growth trajectories of rain forest tree species. Journal of Ecology 99: 1431-1440."
11,"Herault, B., Ouallet, J., Blanc, L., Wagner, F., and Baraloto, C. (2010). Growth responses of neotropical trees to logging gaps. Journal of Applied Ecology 47: 821-831."
12,"IFN. (2011). Les resultats issus des campagnes d'inventaire 2006, 2007, 2008, 2009, 2010 et 2011. Inventaire Forestier National, Nogent-sur-Vernisson, FR."
13,http://inventaire-forestier.ign.fr/spip/spip.php?rubrique153
14,"Villaescusa, R. & Diaz, R. (1998) Segundo Inventario Forestal Nacional (1986-1996), Ministerio de Medio Ambiente, ICONA, Madrid."
15,"Villanueva, J.A. (2004) Tercer Inventario Forestal Nacional (1997-2007). Comunidad de Madrid. Ministerio de Medio Ambiente, Madrid."
16,http://www.magrama.gob.es/es/desarrollo-rural/temas/politica-forestal/inventario-cartografia/inventario-forestal-nacional/default.aspx
17,http://www.lfi.ch/index-en.php
18,"Fridman, J., and Stahl, G. (2001). A three-step approach for modelling tree mortality in Swedish forests. Scandinavian Journal of Forest Research 16, 455-466."
18,"Fridman, J., and Stahl, G. (2001). A three-step approach for modelling tree mortality in Swedish forests. Scandinavian Journal of Forest Research 16: 455-466."
19,http://www.fia.fs.fed.us/tools-data/
20,"Wiser, S.K., Bellingham, P.J. & Burrows, L.E. (2001) Managing biodiversity information: development of New Zealand's National Vegetation Survey databank. New Zealand Journal of Ecology, 25, 1-17."
20,"Wiser, S.K., Bellingham, P.J. & Burrows, L.E. (2001) Managing biodiversity information: development of New Zealand's National Vegetation Survey databank. New Zealand Journal of Ecology, 25: 1-17."
21,https://nvs.landcareresearch.co.nz/
23,"Swenson, N.G., J.C. Stegen, S.J. Davies, D.L. Erickson, J. Forero-Montana, A.H. Hurlbert, W.J. Kress, J. Thompson, M. Uriarte, S.J. Wright and J.K. Zimmerman. (2012). Temporal turnover in the composition of tropical tree communities: functional determinism and phylogenetic stochasticity. Ecology 93: 490-499."
24,"Baraloto, C, P.C.E. Timothy, L. Poorter, J. Beauchene, D. Bonal, AM Domenach, B. Hrault, S. Patio, JC Roggy, and Jerome Chave. (2010). Decoupled Leaf and Stem Economics in Rain Forest Trees. Ecology Letters 13: 1338-47."
25,"Wright, S.J., Kitajima, K., Kraft, N.J.B., Reich, P.B., Wright, I.J., Bunker, D.E., Condit, R., Dalling, J.W., Davies, S.J., Daz, S., Engelbrecht, B.M.J., Harms, K.E., Hubbell, S.P., Marks, C.O., Ruiz-Jaen, M.C., Salvador, C.M. & Zanne, A.E. (2010) Functional traits and the growth-mortality trade-off in tropical trees. Ecology 91: 3664-3674."
Data set name,Country,Data type,Plot size,Dbh threshold,Number of plots,Traits,Source trait data,References,Contact of person in charge of data formatting,Comments
NSW,"New South Wales, Australia",LPP,0.075 to 0.36 ha,10 cm,30,"Wood density, Maximum height, and Seed mass",local,"1,2",R. M. Kooyman (robert@ecodingo.com.au),Permanents plots established by the NSW Department of State Forests or by RMK
Panama,Panama,LPP,1 to 50 ha,1 cm,42,"Wood density, SLA, Maximum height, and Seed mass",local,"3,4",R. Condit (conditr@gmail.com),The data used include both the 50 ha lot of BCI and the network of 1 ha plots from Condit et al. (2013). The two first census of BCI plot were excluded.
Panama,Panama,LPP,1 to 50 ha,1 cm,42,"Wood density, SLA, Maximum height, and Seed mass",local,"3,4,25",R. Condit (conditr@gmail.com),The data used include both the 50 ha lot of BCI and the network of 1 ha plots from Condit et al. (2013). The two first census of BCI plot were excluded.
Japan,Japan,LPP,0.35 to 1.05 ha,2.39 cm,16,"Wood density, SLA, Maximum height, and Seed mass",local,5,M. I. Ishihara (moni1000f_networkcenter@fsc.hokudai.ac.jp),
Luquillo,Puerto Rico,LPP,16 ha,1 cm,1,"Wood density, SLA, Maximum height, and Seed mass",local,6,J. Zimmerman (esskz@ites.upr.edu),
Luquillo,Puerto Rico,LPP,16 ha,1 cm,1,"Wood density, SLA, Maximum height, and Seed mass",local,"6, 23",J. Zimmerman (esskz@ites.upr.edu),
M'Baiki,Central African Republic,LPP,4 ha,10 cm,10,"Wood density, SLA, and Seed mass",local,"7,8",G. Vieilledent (ghislain.vieilledent@cirad.fr),
Fushan,Taiwan,LPP,25 ha,1 cm,1,"Wood density, SLA, and Seed mass",local,9,I-F. Sun (ifsun@mail.ndhu.edu.tw),
Paracou,French Guiana,LPP,6.25 ha,10 cm,15,"Wood density, SLA, and Seed mass",local,"10,11",B. Herault (bruno.herault@cirad.fr),
Paracou,French Guiana,LPP,6.25 ha,10 cm,15,"Wood density, SLA, and Seed mass",local,"10,11,24",B. Herault (bruno.herault@cirad.fr),
France,France,NFI,0.017 to 0.07 ha,7.5 cm,41503,"Wood density, SLA, Maximum height, and Seed mass",TRY,"12,13",G. Kunstler (georges.kunstler@gmail.com),"The French NFI is based on temporary plot, but 5 years tree radial growth is estimated with short core. All trees with dbh > 7.5 cm, > 22.5 cm and > 37.5 cm were measured within a radius of 6 m, 9 m and 15 m, respectively. Plots are distributed over forest ecosystems on a 1-km 2 cell grid"
Spain,Spain,NFI,0.0078 to 0.19 ha,7.5 cm,49855,"Wood density, SLA, Maximum height, and Seed mass",TRY,"14,15,16",M. Zavala (madezavala@gmail.com),"Each SFI plot included four concentric circular sub-plots of 5, 10, 15 and 25-m radius. In these sub-plots, adult trees were sampled when diameter at breast height (d.b.h.) was 7.5-12.4 cm, 12.5-22.4 cm, 22.5-42.5 cm and >= 42.5 cm, respectively."
Swiss,Switzerland,NFI,0.02 to 0.05 ha,12 cm,2665,"Wood density, SLA, Maximum height, and Seed mass",TRY,17,N. E. Zimmermann (niklaus.zimmermann@wsl.ch),"All trees with dbh > 12 cm and > 36 cm were measured within a radius of 7.98 m and 12.62 m, respectively."
Sweden,Sweden,NFI,0.0019 to 0.0314 ha,5 cm,22904,"Wood density, SLA, Maximum height, and Seed mass",TRY,18,G. Stahl (Goran.Stahl@slu.se),"All trees with dbh > 10 cm, were measured on circular plots of 10 m radius."
US,USA,NFI,0.0014 to 0.017 ha,2.54 cm,97434,"Wood density, SLA, Maximum height, and Seed mass",TRY,"19,20",M. Vanderwel (Mark.Vanderwel@uregina.ca ),FIA data are made up of cluster of 4 subplots of size 0.017 ha for tree dbh > 1.72 cm and nested in each subplot sapling plots of 0.0014 ha for trees dbh > 2.54 cm. The data of the four subplot were lumped together.
US,USA,NFI,0.0014 to 0.017 ha,2.54 cm,97434,"Wood density, SLA, Maximum height, and Seed mass",TRY,19,M. Vanderwel (Mark.Vanderwel@uregina.ca),FIA data are made up of cluster of 4 subplots of size 0.017 ha for tree dbh > 1.72 cm and nested in each subplot sapling plots of 0.0014 ha for trees dbh > 2.54 cm. The data of the four subplot were lumped together.
Canada,Canada,NFI,0.02 to 0.18 ha,2 cm,15019,"Wood density, SLA, Maximum height, and Seed mass",TRY,,J. Caspersen (john.caspersen@utoronto.ca),The protocol is variable between Provinces. A large proportion of data is from the Quebec province and the plot are 10 m in radius in this Province.
NVS,New Zealand,NFI,0.04 ha,3 cm,1415,"Wood density, SLA, Maximum height, and Seed mass",local,"20,21",D. Laughlin (d.laughlin@waikato.ac.nz),Plots are 20 x 20 m.
NZ,New Zealand,NFI,0.04 ha,3 cm,1415,"Wood density, SLA, Maximum height, and Seed mass",local,"20,21",D. Laughlin (d.laughlin@waikato.ac.nz),Plots are 20 x 20 m.
% Supplementary Information
# Supplementary methods
The log transformed growth model is:
\begin{equation} \label{logG1}
......@@ -41,7 +41,9 @@ dat <- read.csv('../../data/metadata/sites/sites_description.csv', check.names=F
i <- match("References", names(dat))
dat <- dat[,c(seq_len(ncol(dat))[-c(i)], i)]
refs <- read.csv('../../data/metadata/sites/references.csv', check.names=FALSE, stringsAsFactors=FALSE)
refs <- read.csv('../../data/metadata/sites/references.csv', check.names=FALSE,
stringsAsFactors=FALSE)
refs$citation <- iconv(refs$citation, "ISO_8859-2", "UTF-8")
replace_refs <- function(x){
ids <- as.numeric(unlist(strsplit(x,",")))
......@@ -59,15 +61,15 @@ paste_name_data <- function(df){
llply(names(df)[-c(1)], function(x) sprintf("- %s: %s", x, df[[x]])), collapse="\n")
)
}
writeLines(unlist(dlply(dat, 1, paste_name_data)))
list.t <- dlply(dat, 1, paste_name_data)
writeLines(unlist(list.t[dat[["Data set name"]]]))
```
# Supplementary discussion
## Variations between biomes
The results were more variable for SLA than for other traits (Fig. 2 main text). The different sign for the parameter $\alpha_r$ related to the link between trait and competitive response in temperate forest biome, may be related to the high abundance of deciduous species in this biomes (see Extended data Table 1). Previous studies[@lusk_why_2008] has reported a different link between shade-tolerance and SLA for deciduous and evergreen species. The only other important differences between biomes was taiga for which the parameter relating wood density to competitive impact was positive whereas this parameter was negative in the other biomes (Fig 2 main text). We have ne satisfactory explanation for this discrepancy. The number of species in this biomes is relatively limited in comparison with the other biomes and there is a high dominance of conifer species for which the range of wood density is much narrow than for the angiosperm (see Extended data Table 1).
The results were more variable for SLA than for other traits (Fig. 2 main text). The different sign for the parameter $\alpha_r$ related to the link between trait and competitive response in temperate forest biome, may be related to the high abundance of deciduous species in this biomes (see Extended data Table 1). Previous studies[@lusk_why_2008] has reported a different link between shade-tolerance and SLA for deciduous and evergreen species. The only other important differences between biomes was taiga for which the parameter relating wood density to competitive impact was positive whereas this parameter was negative in the other biomes (Fig 2 main text). We have no satisfactory explanation for this discrepancy. The number of species in this biomes is relatively limited in comparison with the other biomes and there is a high dominance of conifer species for which the range of wood density is much narrow than for the angiosperm (see Extended data Table 1).
# References
......
name,address,reply
Georges Kunstler,"1, 2",YES
David A. Coomes,3,YES
Daniel Falster,2,YES
Francis Hui,4,YES
Robert M. Kooyman,"2, 5",YES
Daniel Laughlin,6,YES
Lourens Poorter,7,YES
Mark Vanderwel,8,YES
Ghislain Vieilledent,9,YES
Joseph S. Wright,10,YES
Masahiro Aiba,11,YES
Christopher Baraloto,"12, 13",NO
John Caspersen,14,YES
J. Hans C. Cornelissen,15,YES
Sylvie Gourlet-Fleury,9,NO
Marc Hanewinkel,"16, 17",YES
Bruno Herault,13,YES
Jens Kattge,18,NO
Hiroko Kurokawa,"11, 19",YES
Yusuke Onoda,20,NO
Josep Penuelas,21,YES
Hendrik Poorter,22,YES
Maria Uriarte,23,YES
Sarah Richardson,24,NO
Paloma Ruiz-Benito,"25, 26",YES
I-Fang Sun,27,NO
Goran Ståhl,28,YES
Nathan Swenson,29,YES
Jill Thompson,"30, 31",NO
Bertil Westerlund,28,YES
Christian Wirth,"32, 33",NO
Miguel Zavala,26,YES
Hongcheng Zeng,12,YES
Jess Zimmerman,31,YES
Niklaus E. Zimmermann,34,NO
Mark Westoby,3,YES
......@@ -29,8 +29,9 @@ path.root <- git.root()
##+ kable2, echo = FALSE, results="asis", message=FALSE
library(pander)
data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'))
data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'), stringsAsFactors = FALSE)
dat.2 <- data.set[, -(2)]
dat.2[dat.2$set == 'NVS',1] <- 'NZ'
var.names <- colnames(dat.2)
var.names[2] <- '# of trees'
var.names[3] <- '# of species'
......@@ -85,6 +86,6 @@ row.names(mat.param) <- c('$\\gamma$', '$m_1$', '$alpha_0$',
'$\\alpha_s$', '$R^2$*')
##+ Table2_Effectsize, echo = FALSE, results='asis', message=FALSE
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) presentedestimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters")
pandoc.table(mat.param, caption = "Standaridized parameters estimates and standard error (in bracket) estimated for each traits and $R^2$* of models. See Fig 1. in main text for explanation of parameters")
## \* We report the conditional $R^2$ of the models using the methods of Nakagawa, S. & Schielzeth, H. A general and simple method for obtaining R2 from generalized linear mixed-effects models. Methods in Ecology and Evolution 4, 133–142 (2013).
......@@ -31,8 +31,9 @@ path.root <- git.root()
``` {r kable2, echo = FALSE, results="asis", message=FALSE}
library(pander)
data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'))
data.set <-read.csv(file.path(path.root, 'output', 'data.set.csv'), stringsAsFactors = FALSE)
dat.2 <- data.set[, -(2)]
dat.2[dat.2$set == 'NVS',1] <- 'NZ'
var.names <- colnames(dat.2)
var.names[2] <- '# of trees'
var.names[3] <- '# of species'
......
......@@ -22,9 +22,9 @@
-------- ------------ -------------- ---------------- ----------------- ----------------
Sweden 2e+05 26 22552 0.27 0.73
NVS 53775 117 1415 0.94 0.99
NZ 53775 117 1415 0.94 0.99
US 1370497 492 59840 0.63 0.37
US 1369815 493 59840 0.63 0.37
Canada 5e+05 75 14983 0.34 0.65