Publications by Yihui Xie
R is an Epic Fail?
I came across this blog post just now: The Next Big Thing, and of course these words caught my attention: […] However, for me personally and for most users, both individual and organizational, the much greater cost of software is the time it takes to install it, maintain it, learn it and document it. On that, R is an epic fail. I don’t reall...
1850 sym
alphahull: an R Package for Alpha-Convex Hull
A new paper on the α-convex hull appeared in the Journal of Statistical Software today (http://www.jstatsoft.org/v34/i05/paper). The α-convex hull is an interesting problem which caught my attention long time ago but I didn’t know a solution then. R has a function chull() which can generate (indices of) the convex hull for a series of points....
1574 sym R (1004 sym/2 pcs) 2 img
My Talk on Animations at useR! 2010 (NIST, Gaithersburg)
As every useR knows, the useR! 2010 conference is being held at NIST in Gaithersburg these days. I have just finished my talk on the R package animation this afternoon. Here are my slides and R code for those who are interested: Download: Slides (1.6M), and R code (3.6K); Note you may need Acrobat Reader to watch the animations inside the slides....
1016 sym 2 img
Auto-completion in Notepad++ for R Script
Update: now the long hints for function parameters can be broken into several shorter lines. Auto-completion is fancy in a text editor. Notepad++ does not support auto-completion for the R language, so I spent a couple of hours on creating such an XML file to support R: Download: R.xml (938Kb) Put it under ‘plugins/APIs‘ in the installation d...
1875 sym R (150 sym/1 pcs) 4 img
SyntaxHighlighter Brush for the R Language
Tal Galili requested in the R-help mailing list for a SyntaxHighlighter brush for the R language, so that WordPress users can highlight their R code easily. I promised to contribute a few minutes on this task, and here is the result: shBrushR.js (1Kb) /** * Author: Yihui Xie * URL: http://yihui.name/en/2010/09/syntaxhighlighter-brush-for-the-...
3531 sym R (1884 sym/4 pcs)
A Slider to Control Two Plotting Windows
One of my readers asked two weeks ago how to control two graphics windows with the slider in gWidgets. Here is a simple example: if (!require("gWidgetsRGtk2")) install.packages("gWidgetsRGtk2") library(gWidgetsRGtk2) options(guiToolkit = "RGtk2") graphics.off() x11() x11() dev.set() gslider(from = 1, to = 100, value = 10, container = gwin...
922 sym R (449 sym/1 pcs)
On the Gory Loops in R
This blog post is mainly for Stat 579 students on the homework for week 7, since I received too many “gory” loops in the homework submissions and I think it would help a bit to write my thoughts on R loops for beginners. The immortal motto for newbies in programming is: If you want to make an apple pie from scratch, you must first create the ...
4481 sym R (2772 sym/7 pcs)
Grabbing Tables in Webpages Using the XML Package
Tables are pretty common in web pages as data sources, and the most direct way to get these data is probably to copy and paste. This is OK if there are only two or three tables, and when we need to grab 5000 tables in 1000 web pages, we may not really wish to fulfill the task by hand. That is one of the reasons for why we need programming — we ...
2316 sym R (5377 sym/2 pcs)
How to Start Using (pgf)Sweave in LyX in One Minute
Take a look at the video in this entry if you don’t understand the title. To put it short, install LyX and R as well as a working LaTeX toolkit such as MikTeX or TeXLive or MacTeX; run source('http://yihui.name/en/wp-content/uploads/2010/10/lyx-pgfsweave-config.R') in R under Windows or Ubuntu or Mac; I tried my best to automatically configure...
9587 sym R (245 sym/3 pcs)
Rd2roxygen: Convert Rd to roxygen documentation
I must admit that I have been tired of maintaining my R packages for a long time, and the main reason is I feel really uncomfortable with writing R documentations (Rd). The required structure of an R package mainly includes two directories R and man — the former for the R source code (typically functions), and the latter for documentation. In t...
3927 sym