Description Usage Arguments Examples
Creates a sequence of figures of the forest state from above displayed as a "movie".
1 | create_movie(files, decades, a, species, scol, plotlegend=TRUE, aspect=1, silent=FALSE)
|
files |
LandClim decade output "fullOut10" etc. One file per time step for the movie. |
decades |
Vector, Decade corresponding to files, used as labels. |
a |
LandClim cell size. |
species |
Simulated species, names used as column names in the LandClim output. |
scol |
Color vector. See also ?landclim_colors. |
plotlegend |
TRUE or FALSE |
aspect |
Function argument asp in plot(). |
silent |
TRUE/FALSE |
1 2 3 4 5 6 7 8 9 10 11 12 | ## full <- read.csv(file = "fullOut_30.csv", strip.white = TRUE)
## species <- unique(full$species)
## fi <- data.frame(file = c("fullOut_30.csv", "fullOut_31.csv","fullOut_32.csv","fullOut_33.csv","fullOut_34.csv"), decade = c(30, 31, 32, 33,34))
## pdf(paste(path,"movie.pdf", sep=""))
## par(mfrow=c(2,2))
## create_movie(files=fi$file, decades=fi$decade, a=25, species=species, scol=rainbow(length(species)), plotlegend=TRUE, aspect=1)
## dev.off()
## library(animation)
## saveGIF(create_movie(files = fi$file, decades = fi$decade, a = 25, species = species, scol = rainbow(length(species)), plotlegend=TRUE, aspect=1), movie.name = "LandClimForest.gif")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.