File: flowers.R

package info (click to toggle)
r-cran-animation 2.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,268 kB
  • sloc: javascript: 873; sh: 15; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 594 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
## this demo show you how to download images from the Internet and
## create an animation using the animation package

library(animation)
saveHTML({
  ## a custom file list on the Internet
  extList = c('http://i.imgur.com/rJ7xF.jpg',
              'http://i.imgur.com/Lyr9o.jpg',
              'http://i.imgur.com/18Qrb.jpg')
  for (i in 1:length(extList)) {
    download.file(url = extList[i], destfile = sprintf(ani.options('img.fmt'), i), mode = 'wb')
  }
}, use.dev = FALSE, ani.width = 640, ani.height = 480, ani.type = 'jpg',
         interval = 2, single.opts = "'dwellMultiplier': 1")