Installation
In order to install the package you need the package remotes.
install.packages("remotes")
To install the TreeMig package from this repository you can use this code:
remotes::install_gitlab(repo = "boehmd/TreeMig@master", subdir = "Wrapper/TreeMig_Package",
host="https://gitlab.wsl.ch/", auth_token = "13Nh_3Y7Hg_zuPBJHRiw", force=TRUE, upgrade = "never")
(on realease the repository will be public (GitHub?) so no creds are needed)
TreeMig Environment
After installing the package, you can create a TreeMig environment with the following command:
TreeMig::createTMEnvironment(path, name)
This will create a new directory at path/name with all the necessary files to run TreeMig. Inside this folder you will find a file named ExampleScript.R. This is the main script which you can use as a template.
Folder Structure
The TreeMig directory contains the following folders:
Folder | Desc |
---|---|
C | control files are located here, if you load any control file with cfg$loadConfig() the file should be in this folder |
E | bioclimate and stock input data |
P | tree parameter file |
R | simulation results |
Files | Desc |
---|---|
listOfCtrlPars.txt | defines the control file name and the OS for TreeMig |
statefile.txt | input for TreeMig, see statefile for more information |
TM.exe/TM_Mac.app | this is the TreeMig executable that will run TreeMig |
For now you don't have to worry about these files. The R-Package will modify the files needed for your simulation and put them into the corresponding folders.
For additional information/examples see the wiki-page