Commit 29b23ea2 authored by kunstler's avatar kunstler
Browse files

log MAT MAP

parent 9bd61a54
......@@ -170,7 +170,7 @@ load.data.for.lmer <- function(trait, data.type,
df <- dplyr::filter(df, set == select.set.)
}
if(!is.na(sample.size.) ){
if(sample.size. < length(unique(df$plot))){
if(sample.size. < length(unique(df$plot))){
if(!sample.vec.TF.){
if(sample.size. > length(unique(df$plot))){
sample.size. <- length(unique(df$plot))}
......@@ -335,11 +335,11 @@ return(as.vector(scale(x, ...)))
get.variables <- function(data.tree, BATOT, CWM.tn,
abs.CWM.tntf, tf, ecocode.var = 'wwf',
min.BA.G = 40){
min.BA.G = 40, min.MAT = 10){
logG <- scale.d(log(data.tree[["BA.G"]] + min.BA.G+1))
logD <- scale.d(log(data.tree[["D"]]))
MAT <- scale.d(data.tree[["MAT"]])
MAP <- scale.d(data.tree[["MAP"]])
MAT <- scale.d(log(data.tree[["MAT"]]+min.MAT))
MAP <- scale.d(log(data.tree[["MAP"]]))
species.id <- as.character(factor(data.tree[["sp.name"]]))
plot.id <- as.character(factor(data.tree[["plot"]]))
tree.id <- as.character(factor(data.tree[["tree.id"]]))
......@@ -375,11 +375,11 @@ return(data.frame(logG = logG,
get.variables.Multi <- function(data.tree, BATOT, Multi.type = 'a',
ecocode.var = 'wwf',
min.BA.G = 40){
min.BA.G = 40, min.MAT = 10){
logG <- scale.d(log(data.tree[["BA.G"]] + min.BA.G+1))
logD <- scale.d(log(data.tree[["D"]]))
MAT <- scale.d(data.tree[["MAT"]])
MAP <- scale.d(data.tree[["MAP"]])
MAT <- scale.d(log(data.tree[["MAT"]]+min.MAT))
MAP <- scale.d(log(data.tree[["MAP"]]))
species.id <- as.character(factor(data.tree[["sp.name"]]))
plot.id <- as.character(factor(data.tree[["plot"]]))
tree.id <- as.character(factor(data.tree[["tree.id"]]))
......@@ -443,11 +443,11 @@ return(data.frame(logG = logG,
get.variables.cat <- function(data.tree, BATOT, CWM.tn,
abs.CWM.tntf, tf, ecocode.var = 'wwf',
min.BA.G = 40){
min.BA.G = 40, min.MAT = 10){
logG <- scale.d(log(data.tree[["BA.G"]]+min.BA.G+1))
logD <- scale.d(log(data.tree[["D"]]))
MAT <- scale.d(data.tree[["MAT"]])
MAP <- scale.d(data.tree[["MAP"]])
MAT <- scale.d(log(data.tree[["MAT"]]+min.MAT))
MAP <- scale.d(log(data.tree[["MAP"]]))
species.id <- factor(data.tree[["sp.name"]])
plot.id <- factor(data.tree[["plot"]])
tree.id <- factor(data.tree[["tree.id"]])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment