## LOAD THE CUSTOM FUNCTIONS source("myFunctions.R") ## LOAD DATA FROM SIMULATIONS AND PACKAGES load("Data/LandUseS2.Rda") ; library(reshape) ; library(rgdal) ## EXTRACT THE LAND USE ABOUT PASTURES PRS2 <- LandUseS2[, substr(names(LandUseS2), 1, 2)%in% c("MA", "PR")] PPR2 <- melt(PRS2, id= "MAILLE") PPR2$time <- as.numeric(substr(PPR2$variable, 3, 4)) ## LINEAR INTERPOLATION OF DECENIAL TRENDS LinApprox(PPR2) ## MERGE WITH THE GEOGRAPHIC FILES MPRS2 <- merge(DAT, CRD[, 6: 8], by= "MAILLE") coordinates(MPRS2) <- c("X1", "X2") ## CREATE THE SPATIO-TEMPORAL ANIMATION AnimHTML(MPRS2, ttle= "Pastures, Scenario S2", pal= "Spectral", brks= c(-100, -30, -15, -5, 0, 5, 15, 30, 100), t1= "Scenario S2, Pastures: (Area ", t2= "- Area 2003)* 100", dir= "./output/PR2/", name= "PRS2.html")