# Posts Tagged ‘ R Computation ’

## knitr: Elegant, flexible and fast dynamic report generation with R

December 1, 2011
By

The world has changed. You can feel it on GitHub. You can smell it on Google+. For those who have been struggling with Sweave, here comes the knitr package. It has features that you have been longing for, and features that you might have never imagined. Thumb through the PDF manual to see some of

## R Tips in Stat 511

March 22, 2010
By
$\reverse C(X'X)^{-1}X'$

Here are some (trivial) R tips in the course Stat 511. I’ll update this post till the semester is over. Formatting R Code Reading code is pain, but the well-formatted code might alleviate the pain a little bit. The function tidy.source() in the animation package can help us format our R code automatically. By default

## 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

## Counterintuitive Results in Flipping Coins

August 28, 2009
By

oin-flipping is a rather old topic in probability theory, so most of us think we know very well about it, however, the other day I saw a question about this old topic (in David Smith’s REvolution?) which was beyond me expectation: how many times do we need to flip the coin until we get a