cscore_site: 'cscore_site' to calculate C-score for each site.

Description Usage Arguments Details Value Author(s)

View source: R/cscore_site.R

Description

cscore_site to calculate C-score for each site.

Usage

1
2
cscore_site(df, method = "c0", nsimul = 1000, rarefy = FALSE, n = 1000,
  q = 20)

Arguments

df

data frame of vegtation data. Should have site, quad, sp columns. This function will call wide_by_site function inside.

method

methods for building null models. Check oecosium from vegan package for more options. 'c0' for fixed species incidence and equalprobalility for site (site species richness can vary); 'quasiswap' for fixed sp - fixed site, suppose to be faster; 'tswap' also for fixed-fixed but slower. Default is 'c0'.

nsimul

how many null communities to use for simulation? Default is 1000.

rarefy

Do you want to rarefy sites or not? Default is FALSE.

n

used only if rarefy=TRUE. n times of ramdom sampling from quadrats of 2000s data for each site.

q

used only if rarefy=TRUE. How many quadrats to sample out for 2000s data for all sites.

Details

If no rarefy, this function uses wide_by_site() function to change long veg table into wide table for each site (returned a list), then for each site of the list, calculate the standardized effect size z = (X_obs - X_meanSim) / sd_sim using null models. If rarefy=TRUE, it calls wide_by_site_rarefy() function to change long veg table into wide table for each site n times

Value

If no rarefy, it returns a dataframe. It has 'z', 'means_sim', 'pval', 'cs_obs', 'site' columns. If rarefy=TRUE, it returns a list: detail and summary for all sites.

Author(s)

Daijiang Li


daijiang/dli55 documentation built on Jan. 28, 2018, 3:48 a.m.