Running examples in ‘surveillance-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: epidataCS_animate
> ### Title: Spatio-Temporal Animation of a Continuous-Time Continuous-Space
> ###   Epidemic
> ### Aliases: animate.epidataCS
> ### Keywords: hplot dynamic spatial
> 
> ### ** Examples
> 
> data("imdepi")
> imdepiB <- subset(imdepi, type == "B")
Note: dropped type(s) "C"
> 
> # Animate the first year of type B with a step size of 7 days
> animate(imdepiB, interval=c(0,365), time.spacing=7, nmax=Inf, sleep=0.1)
> 
> # Sequential animation of type B events during the first year
> animate(imdepiB, interval=c(0,365), time.spacing=NULL, sleep=0.1)
> 
> # Animate the whole time range but with nmax=20 snapshots only
> animate(imdepiB, time.spacing=NA, nmax=20, sleep=0.1)
> 
> # Such an animation can be saved in various ways using the tools of
> # the animation package, e.g., saveHTML()
> if (require("animation")) {
+   oldwd <- setwd(tempdir())  # to not clutter up the current working dir
+   saveHTML(animate(imdepiB, interval = c(0,365), time.spacing = 7),
+            nmax = Inf, interval = 0.2, loop = FALSE,
+            title = "Animation of the first year of type B events")
+   setwd(oldwd)
+ }
Loading required package: animation
Warning in file(con, "w") :
  cannot open file './js/Rplot.js': Permission denied
Error in file(con, "w") : cannot open the connection
Calls: saveHTML -> writeLines -> file
Execution halted
rm: cannot remove '/tmp/Rtmp3dcT2u/css/scianimator.light.css': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/css/styles.css': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/css/scianimator.css': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/css/scianimator.blue.css': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/css/scianimator.dark.css': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/css/reset.css': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/js/jquery.scianimator.min.js': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/js/template.js': Permission denied
rm: cannot remove '/tmp/Rtmp3dcT2u/js/jquery-1.4.4.min.js': Permission denied