Package 'fddimensionality'

Title: Test Effect of Traits of FD-Environment Relationship
Description: Companion code for paper XXX <doi:xxx> on FD-Environment relationship, which tests to what extent we can expect FD-Environment trait relationship in function of number of traits included and type of environmental filtering.
Authors: Matthias Grenié [aut, cre, cph] , François Munoz [aut] , Cyrille Violle [aut]
Maintainer: Matthias Grenié <[email protected]>
License: MIT + file LICENSE
Version: 0.0.0.9000
Built: 2024-11-04 03:18:55 UTC
Source: https://github.com/Rekyt/fddimensionality_ms

Help Index


Compute Functional Diversity Using All Dissimilarities

Description

Compute Functional Diversity Using All Dissimilarities

Usage

compute_dissim_di(trait_dissim_list, site_sp_df, trait_comb_df)

Arguments

trait_dissim_list

[⁠list(list(matrix(1+)))⁠]
a list containing list of dissimilarity matrices with their names

site_sp_df

[data.frame()]
a tidy species data.frame with a row defining a species in a site with its abundance

trait_comb_df

[data.frame()]
a data.frame with the list of trait combinations considered as well as the number of traits included


Compute FD indices without abundances

Description

Wrapper around FD::dbFD()

Usage

compute_other_fd(site_sp_df, trait_comb, trait_df, var_type = "env")

Arguments

site_sp_df

[data.frame()]
a tidy species data.frame with a row defining a species in a site with its abundance

trait_comb

[⁠list(character(1+))⁠]
a list contaning combinations of trait combinations

trait_df

[data.frame()]
a trait data.frame with species as rows and traits as columns

var_type

[character(1)]
a string giving the column on which site_sp_df should be spread


Compute Trait Dissimilarities

Description

For each provided trait combination in a list, returns a list of dissimilarity matrices computed using funrar. This function computes euclidean dissimilarity matrices

Usage

compute_trait_dissim(trait_comb_list, trait_df)

Arguments

trait_comb_list

[⁠list(character(1+))⁠]
a list of character vectors containing the trait combination on which dissimilarity should be computed

trait_df

[data.frame()]
a trait data.frame with species as rows and traits as columns

Value

a list of dissimilarity matrices with concatenated names from trait combinations


Generate uncorrelated traits

Description

Generate uncorrelated traits

Usage

generate_traits(n_species, n_traits)

Arguments

n_species

[integer(1)]
the number of species

n_traits

[integer(1)]
the number of traits

Value

a matrix with n_species rows and n_traits column with uniform uncorrelated traits between 0 and 1

Examples

generate_traits(3, 2)

Contains Local vs. Global drake workflow

Description

Contains Local vs. Global drake workflow

Usage

global_workflow()

Figure of FD vs. Environment Comparing Observed and SES values

Description

Figure of FD vs. Environment Comparing Observed and SES values

Usage

plot_env_fd_obs_ses_two(full_fd_df)

Arguments

full_fd_df

[data.frame()]
data.frame containing both observed and SES values of functional diversity


Scale Vector between Zero and One

Description

With a numeric vector scale between zero and one.

Usage

scale_zero_one(vec)

Arguments

vec

a numeric vector

Examples

vec = stats::rnorm(1000)

zero_one = scale_zero_one(vec)

range(vec)
range(zero_one)