Skip to content

Commit 46f2d7b

Browse files
committedMar 19, 2019
start repository
1 parent d1deddb commit 46f2d7b

9 files changed

+38
-0
lines changed
 

‎docs/SIR_model.Rdata

585 Bytes
Binary file not shown.

‎docs/index.Rmd

+38
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,41 @@
22

33
List of user-contributed modelbuilder models
44

5+
```{r, echo = FALSE}
6+
library(modelbuilder)
7+
library(purrr)
8+
library(magrittr)
9+
#Get list of all models (Rdata files) in the mbmodel folder
10+
files = list.files(path = "../mbmodels/", recursive=FALSE, pattern = "\\.rds$", full.names = TRUE)
11+
#data frame to contain content for all model files
12+
13+
df = data.frame(Title = rep(0,length(files)))
14+
df$ShortDesc = "0"
15+
df$LongDesc = "0"
16+
df$Author = "0"
17+
df$Date = "0"
18+
19+
#allmodels <- files %>% purrr::map(readRDS)
20+
#allmodels %>% map(modelbuilder::check_model())
21+
22+
#df <- files %>% map(readRDS)
23+
24+
for (n in 1:length(files))
25+
{
26+
mbmodel <- readRDS(files[n])
27+
modelerror <- check_model(mbmodel)
28+
if (is.null(modelerror))
29+
{
30+
df[n,"Title"]=mbmodel$title
31+
df[n,"ShortDesc"]=mbmodel$description
32+
df[n,"LongDesc"]=mbmodel$details
33+
df[n,"Author"]=mbmodel$author
34+
df[n,"Date"]=mbmodel$date
35+
}
36+
else #if model didn't pass check
37+
{
38+
df[n,"Title"]=mbmodel$title
39+
df[n,"ShortDesc"]=modelerror
40+
}
41+
}
42+
```

‎mbmodels/Basic_Bacteria_model.rds

732 Bytes
Binary file not shown.

‎mbmodels/Basic_Virus_model.rds

788 Bytes
Binary file not shown.

‎mbmodels/Cholera_model.rds

764 Bytes
Binary file not shown.
799 Bytes
Binary file not shown.

‎mbmodels/SEIRS_model.rds

780 Bytes
Binary file not shown.

‎mbmodels/SIR_model.rds

585 Bytes
Binary file not shown.
833 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)