[R-pkgs] formatR update (0.1-5)

From: Yihui Xie <xie_at_yihui.name>
Date: Fri, 03 Dec 2010 09:11:02 -0600


In formatR 0.1-5, the dependency on the gWidgets and animation packages are removed. The GUI by gWidgets is optional now.

Meanwhile, the function tidy.source() has been moved from the animation package to this package.

> library(formatR)
> tidy.source(textConnection('

  # rotation of the word "Animation"
  # in a loop; change the angle and color
  # step by step

  for (i in 1:360) {
  # redraw the plot again and again
  plot(1,ann=FALSE,type="n",axes=FALSE)
  # rotate; use rainbow() colors
  text(1,1,"Animation",srt=i,col=rainbow(360)[i],cex=7*i/360)    # pause for a while
   Sys.sleep(0.01)}
'))
# rotation of the word 'Animation'
# in a loop; change the angle and color
# step by step

for (i in 1:360) {

    # redraw the plot again and again
    plot(1, ann = FALSE, type = "n", axes = FALSE)     # rotate; use rainbow() colors
    text(1, 1, "Animation", srt = i, col = rainbow(360)[i], cex = 7 * i/360)     # pause for a while
    Sys.sleep(0.01)
}

For more information, see http://yihui.name/en/2010/12/formatr-update-0-1-5/

Regards,
Yihui

--
Yihui Xie <xieyihui_at_gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA

_______________________________________________
R-packages mailing list
R-packages_at_r-project.org
https://stat.ethz.ch/mailman/listinfo/r-packages
Received on Sat 04 Dec 2010 - 05:09:13 EST

This archive was generated by hypermail 2.2.0 : Sat 04 Dec 2010 - 05:10:01 EST