Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
florianhartig committed Jul 19, 2024
1 parent 23bc4fc commit 1cdbc7b
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 15 deletions.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# PhyloSim

A model, provided as an R package, for the simulation of spatially explicit biogeographical and phylogenetic data.

### Installation

You can install directly from gh, using the 'devtools' package:

```{r}
devtools::install_github(repo = "TheoreticalEcology/EcoPhyloSim", subdir = "phylosim",
dependencies = T, build_vignettes = T)
?PhyloSim
browseVignettes("PhyloSim")
```


64 changes: 64 additions & 0 deletions Readme.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: "EcoPhyloSim"
author: "Florian Hartig"
date: "2024-07-19"
output:
html_document:
keep_md: yes
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```


A model, provided as an R package, for the simulation of spatially explicit biogeographical and phylogenetic data.

### Installation

You can install directly from gh, using the 'devtools' package:

```{r, eval = F}
devtools::install_github(repo = "TheoreticalEcology/EcoPhyloSim/",
subdir = "phylosim",
dependencies = T,
build_vignettes = T)
?PhyloSim
browseVignettes("PhyloSim")
```

###


```{r}
library(PhyloSim)
# Define a parameter set
par <- createCompletePar(x = 50, y = 50, dispersal = 1 , runs = 1000,
density = 0)
# Run the model
simu <- runSimulation(par)
plot(simu)
# Look at the phylogeny (requires package 'ape')
require(ape)
# Get the phylogeny of the last run. In this example this is after 1000 runs.
phylogeny <- simu$Output[[2]]$phylogeny
# Only extant taxa
extantPhylogeny <- drop.fossil(phylogeny)
# Display the results
plot(extantPhylogeny)
#Look at the species area relation
sac(simu, area = c(1,10,100,1000), rep = 100, plot= TRUE)
```

2 changes: 1 addition & 1 deletion phylosim.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ LaTeX: pdfLaTeX

BuildType: Package
PackageUseDevtools: Yes
PackagePath: /Users/florian/Dropbox/Home/Projekte/Papers_in_Progress/17-PhylogeneticRpackage/phylosim/PhyloSim
PackagePath: ./PhyloSim
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace

0 comments on commit 1cdbc7b

Please sign in to comment.