Posts Tagged ‘ Computer Science ’

Why I don’t like Dynamic Typing

February 25, 2012
By

A lot of people consider the static typing found in languages such as C, C++, ML, Java and Scala as needless hairshirtism. They consider the dynamic typing of languages like Lisp, Scheme, Perl, Ruby and Python as a critical advantage (ignoring other features of these languages and other efforts at generic programming such as the Related posts:

Read more »

How to Become an Efficient and Collaborative R Programmer

December 12, 2011
By

I may want to add a subtitle “Why R-Forge Must Die” (thinking of Barry Rowlingson’s talk earlier this year). I have been a GitHub user for two years, and I was mainly influenced by Hadley. Now I even feel a little bit addicted to GitHub (its slogan is “social coding”), because it is really convenient

Read more »

Programmers Should Know R

August 6, 2011
By
Programmers Should Know R

Programmers should definitely know how to use R. I don’t mean they should switch from their current language to R, but they should think of R as a handy tool during development.Again and again I find myself working with Java code like the following. td.linenos { background-color: #f0f0f0; padding-right: 10px; } span.lineno { background-color: #f0f0f0;Related posts:

Read more »

Sweave and pgfSweave in LyX 2.0.x (experimental)

May 25, 2011
By

bout half a year ago, I wrote a post on the configuration of (pgf)Sweave and LyX, which was intended to save us some efforts in going through all the details during the configuration. Now many things have changed: LyX 2.0 has internal support for Sweave, and fortunately I have been in touch with the developers

Read more »

Customizing the Theme of Your R HTML Help

January 4, 2011
By
Customizing the Theme of Your R HTML Help

R’s default theme of the HTML help pages is too plain for me to read, but we can easily modify the theme, which is essentially a CSS file. You can find the file under: file.path(R.home('doc'), 'html', 'R.css') Simply replace this file with my version: which looks like: Of course you can design your own R.css

Read more »

Visualizing Facebook Friends: Eye Candy in R

December 18, 2010
By
Visualizing Facebook Friends: Eye Candy in R

Earlier this week I published a data visualization on the Facebook Engineering blog which, to my surprise, has received a lot of media covereage. I’ve received a lot comments about the image, many asking for more details on how I … Continue reading →

Read more »

SyntaxHighlighter Brush for the R Language

September 11, 2010
By

al 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: /** * Author: Yihui Xie * URL: http://yihui.name/en/2010/09/syntaxhighlighter-brush-for-the-r-language * License: GPL-2 | GPL-3 */

Read more »

Auto-completion in Notepad++ for R Script

August 14, 2010
By
Auto-completion in Notepad++ for R Script

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: Put it under ‘plugins/APIs‘ in the installation directory of Notepad++ (you can see several other XML files there supporting different languages such as

Read more »

Looking for Software Paths in Windows Registry

March 28, 2010
By
Looking for Software Paths in Windows Registry

hen we want to call external programs in R under Windows, we often need to know the paths of these programs. For instance, we may want to know where ImageMagick is installed, as we need the convert (convert.exe) utility to convert images to other formats, or where OpenBUGS is installed because we need this path

Read more »

Guess the Random Seed

March 12, 2010
By

tephanie asked in 511 today if we were able to get the random seed which was set by set.seed() but we were only given the random numbers (without knowing the seed). This kind of “hacker” questions sound interesting. One dirty solution should be the brute-force method, e.g: # x: the random vector; # FUN: the

Read more »