Computer Science

Why I don’t like Dynamic Typing

February 25, 2012 | John Mount

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 ... [Read more...]

Programmers Should Know R

August 6, 2011 | John Mount

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: #f0... [Read more...]

Sweave and pgfSweave in LyX 2.0.x (experimental)

May 25, 2011 | Yihui Xie

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 ... [Read more...]

Customizing the Theme of Your R HTML Help

January 4, 2011 | Yihui Xie

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: ...
[Read more...]

Visualizing Facebook Friends: Eye Candy in R

December 18, 2010 | Paul Butler

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 | Yihui Xie

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 * ... [Read more...]

Auto-completion in Notepad++ for R Script

August 14, 2010 | Yihui Xie

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 ... [Read more...]

Looking for Software Paths in Windows Registry

March 28, 2010 | Yihui Xie

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 ... [Read more...]

Guess the Random Seed

March 12, 2010 | Yihui Xie

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 ... [Read more...]

Press Enter in LyX Sweave as You Wish

February 18, 2010 | Yihui Xie

or a long time I’ve been wondering why we are not able to use Enter in the LyX Scrap environment which was set up by Gregor Gorjanc for Sweave. Two weeks ago, I (finally!) could not help asking Gregor about this issue, as I’m using “LyX + Sweave” more ...
[Read more...]

How to Import MS Excel Data into R

September 26, 2009 | Yihui Xie

s Sir Francis Bacon said, “Histories make men wise; poets witty; the mathematics subtile; natural philosophy deep; moral grave; logic and rhetoric able to contend.” And Windows stupid. He should have added the last sentence if he were a Windows user in this age. 1. Avoid Using M$ Excel A lot ... [Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)