We can list the first 10 models using the getSearchResult
function.
library(ddmore.repository) library(dplyr) library(magrittr) library(purrr)
myModels <- getSearchResult(offset=0) as.data.frame(myModels)
To load all models, search without a query.
allModels <- getSearchResult(all=TRUE) %>% as.data.frame() allModels %>% dplyr::filter(format=="Original code") %>% head()
A specific model can be loaded with the getModel()
function
foo <- getModel(allModels$id[1])
You can download all the files for this model using the saveFiles()
function.
tmp <- tempdir() saveFiles(foo, destination=tmp)
As an example for downloading all files in the DDMoRe repository:
allModels <- getSearchResult(all=TRUE) %>% as.data.frame() pb <- dplyr::progress_estimated(n=nrow(allModels)) allModels$id %>% purrr::map(getModel) %>% purrr::map(function(x) { saveFiles(x, x$identifier) pb$tick()$print() })
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.