Created
October 25, 2014 01:08
-
-
Save bbest/6fb2b13f229e4782eb94 to your computer and use it in GitHub Desktop.
Here's a quick way to loop through running a bunch of species and generating a document by running Knit HTML in RStudio.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Maxent Species Report" | |
output: html_document | |
--- | |
Here's a quick way to loop through running a bunch of species and generating a document by running Knit HTML in RStudio. | |
```{r, results='asis'} | |
spp = c('a','b','c') | |
for (sp in spp){ | |
cmd = sprintf('maxent.exe -input %s_in.shp -output %s_out.shp', sp, sp) | |
#system(cmd) # uncomment this to run it | |
cat(sprintf('## %s\n\ncommand: `%s`\n\n', sp, cmd)) | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment