Skip to content

Latest commit

 

History

History
32 lines (26 loc) · 1.31 KB

README.md

File metadata and controls

32 lines (26 loc) · 1.31 KB

R-Code: The costs of diversity: higher prices for more diverse grassland seed mixtures


We provide here the R-code for reproducing Schaub et al (20xxa).

The code is structured into

  • 'seed_price_master.R': the master R script
  • 'seed_price_des_analysis.R': runs the descriptive analysis, including the Upset approach
  • 'seed_price_lin_model.R': runs the linear analysis of the relationship between seed prices and plant diversity


In order to run the analysis you need to

  1. create a project folder and within this main folder you need to create a sub-folder called 'r_code', in which you save all provided r scripts.
  2. specify your main working directory (i.e., 'wd_code') in the R script 'seed_price_master.R'.
  3. Now you can run the R script 'seed_price_master.R', which downloads the data automatically and reproduces our analysis.


The data of the paper can be found under Schaub et al. (2021b) (https://doi.org/10.3929/ethz-b-000485215)

References:

Schaub, S., et al. 20xxa. The costs of diversity: higher prices for more diverse grassland seed mixtures

Schaub, S., et al. 20xxb. Data: German and Swiss seed mixture prices and characteristics. ETH Research Collection. https://doi.org/10.3929/ethz-b-000485215