DICOM-to-NIfTI Conversion

March 16, 2010
By
DICOM-to-NIfTI Conversion

Now that the two packages oro.dicom and oro.nifti have been released, we can put them together and perform the much sought after conversion from DICOM format to NIfTI format (entirely in R).  Why?  Because DICOM is the international "standard" for medical imaging data coming off the scanners, but it's not the easiest thing to manipulate on...

Read more »

Rcpp 0.7.10

March 15, 2010
By

Versions 0.7.7 to 0.7.9 of Rcpp contained a bug: protecting paths with quotes was supposed to help with Windows builds, but did the opposite at least in 'backticks mode' for getting path and/or library information. Using the shQuote() function instead ...

Read more »

Rcpp 0.7.10

March 15, 2010
By

Versions 0.7.7 to 0.7.9 of Rcpp contained a bug: protecting paths with quotes was supposed to help with Windows builds, but did the opposite at least in 'backticks mode' for getting path and/or library information. Using the shQuote() function instead...

Read more »

Solving the rectangle puzzle

March 15, 2010
By
Solving the rectangle puzzle

Given the wrong solution provided in Le Monde and comments from readers, I went to look a bit further on the Web for generic solutions to the rectangle problem. The most satisfactory version I have found so far is Mendelsohn’s in Mathematics Magazine, which gives as the maximal number for a grid. His theorem is

Read more »

Robert Brown and Pollen Particles

March 15, 2010
By
Robert Brown and Pollen Particles

In 1827, the botanist Robert Brown was studying pollen particles as they floated in water. When viewed through a microscope, he observed that the particles seemed to move around as if the were alive. Although he couldn’t have known at the time, the seemingly random motion was caused by the collision of water molecules

Read more »

Visualizing droughts with R

March 15, 2010
By
Visualizing droughts with R

Physicist and weather scientist Joe Wheatley used R to design and create a useful visual representation of how drought affects a region over long time-scales. Instead of charting absolute rainfall (or lack thereof), he instead charts the Standardized Precipitation Index (SPI), where extreme values (above 2 or below -2) indicate extreme wetness or dryness compared to the usual precipitation...

Read more »

Weighting model fit with ctree in party

March 15, 2010
By
Weighting model fit with ctree in party

Conditional inference trees (ctree) in package party allows weighting which is useful when one classification outcome is more important than another. Useful examples are not difficult to imagine: in a marketing direct mailing, a false positive (non-res...

Read more »

The Price of Calculation

March 15, 2010
By

In a world in which the price of calculation continues to decrease rapidly, but the price of theorem proving continues to hold steady or increase, elementary economics indicates that we ought to spend a larger and larger fraction of our time on calculation.1 Over the next ten years, I hope that more and more mathematically

Read more »

Example 7.27: probability question reconsidered

March 15, 2010
By
Example 7.27: probability question reconsidered

In Example 7.26, we considered a problem, from the xkcd blog:Suppose I choose two (different) real numbers, by any process I choose. Then I select one at random (p= .5) to show Nick. Nick must guess whether the other is smaller or larger. Being righ...

Read more »

R Tutorial Series: R Beginner’s Guide and R Bloggers Updates

March 15, 2010
By
R Tutorial Series: R Beginner’s Guide and R Bloggers Updates

1/1/2011 Update: Tal Galili wrote an article that revisits the first year of R-Bloggers and this post was listed as one of the top 14. Therefore, I decided to make a small update to each section. I start by describing the initial series of tutorials th...

Read more »

R Tutorial Series: R Beginner’s Guide and R Bloggers Updates

March 15, 2010
By
R Tutorial Series: R Beginner’s Guide and R Bloggers Updates

1/1/2011 Update: Tal Galili wrote an article that revisits the first year of R-Bloggers and this post was listed as one of the top 14. Therefore, I decided to make a small update to each section. I start by describing the initial series of tutorials th...

Read more »

t-walk on the banana side

March 14, 2010
By
t-walk on the banana side

Following my remarks on the t-walk algorithm in the recent A General Purpose Sampling Algorithm for Continuous Distributions, published by Christen and Fox in Bayesian Analysis that acts like a general purpose MCMC algorithm, Darren Wraith tested it on the generic (10 dimension) banana target we used in the cosmology paper. Here is an output

Read more »

\pi day!

March 14, 2010
By
\pi day!

It’s π-day today so we gonna have a little fun today with Buffon’s needle and of course R. A well known approximation to the value of $latex \pi$ is the experiment tha Buffon performed using a needle of length,$latex l$. What I do in the next is only to copy from the following file the function

Read more »

Google spreadsheets + google forms + R = Easily collecting and importing data for analysis

March 13, 2010
By

Someone on the R mailing list (link) asked: how can you easily (daily) collect data from many people into a spreadsheet and then analyse it using R. The answer people gave to it where on various ways of using excel.  But excel files (at least for now),  are not “on the cloud”.  A better answer might be to create a...

Read more »

Rosetta language popularity

March 13, 2010
By

Rosetta Code is a community wiki which presents how to solve various programming tasks by different programming languages. Thus, it serves as a dictionary between programming languages, but also as cookbook of programming recipes for a specific language.One unsolved (until today) programming task for R was to rank languages by popularity. I worked on it using the...

Read more »

Rcpp 0.7.9

March 12, 2010
By

Version 0.7.8 of Rcpp, released just a few days ago contained a nasty bug or two which we noticed when trying to built the initial release of RcppArmadillo on 64-bit platforms. So a quick bug-fix release 0.7.9 is now in Debian and should be on CRAN sh...

Read more »

Rcpp 0.7.9

March 12, 2010
By

Version 0.7.8 of Rcpp, released just a few days ago contained a nasty bug or two which we noticed when trying to built the initial release of RcppArmadillo on 64-bit platforms. So a quick bug-fix release 0.7.9 is now in Debian and should be on CRA...

Read more »

Wrong puzzle of the week [w10]?!

March 12, 2010
By
Wrong puzzle of the week [w10]?!

In the weekend supplement to Le Monde, the solution of the rectangle puzzle is given as 32 black squares. I am thus… puzzled!, since my R program there provides a 34 square solution. Am I missing a hidden rectangle in the above?! Given that the solution in Le Monde is not based on a precise

Read more »

R workshops in Vancouver

March 12, 2010
By

Isabella Ghement of the Ghement Statistical Consulting Company is presenting two R workshops in Vancouver, British Columbia: "An Introduction to the Statistical Software Package R" (April 15-16,2010; 8:30am-4:30pm; BCIT; Vancouver) "Advanced Statistical Modeling Using the Statistical Software Package R" (May 20-21, 2010; 8:30am-4:30pm; BCIT; Vancouver) Click the links for more information and registration details.

Read more »

Modified Donchian Band Trend Follower using R, Quantmod, TTR

March 12, 2010
By
Modified Donchian Band Trend Follower using R, Quantmod, TTR

I've been toying around with the examples given on the FOSS trading site for some of the great work they've put together in the Quantmod and TTR packages. Those viewers who are looking for a nice (and free) backtesting suite to possibly complement s...

Read more »

Package Update Roundup: Feb 2010

March 12, 2010
By

This is a list of new or updated packages that were released for R in February, as announced on the r-packages mailing list. To include other updates on this list, please email David Smith. For a complete list of all updates on CRAN, see the CRANberries archive for February 2010. Follow package name links for ratings and other information...

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 »

Because it’s Friday: 3d Mandelbrot

March 12, 2010
By
Because it’s Friday: 3d Mandelbrot

To while away your Friday afternoon, why not explore the nooks and crannies of a 3-D version of the Mandelbrot set: And here's how to create your own 2-D Mandelbrot set in R.

Read more »

Happy Anniversary NYC R Meetup

March 12, 2010
By
Happy Anniversary NYC R Meetup

Today is the one year anniversary of the NYC R Statistical Meetup. Starting as a small group meeting in a crowded conference room, Josh Reich established the meetup as the premiere gathering of data geeks in the tri-state area. Over the past year we have had 10 meetups, and two more upcoming on the

Read more »

RcppArmadillo 0.1.0

March 11, 2010
By

Besides the new RcppExamples, another new package RcppArmadillo got spun out of Rcpp with the recent release 0.7.8 of Rcpp. Romain and I already had an example of a simple but fast linear model fit using the (very clever) Armadillo C++ library by Conr...

Read more »

RcppArmadillo 0.1.0

March 11, 2010
By

Besides the new RcppExamples, another new package RcppArmadillo got spun out of Rcpp with the recent release 0.7.8 of Rcpp. Romain and I already had an example of a simple but fast linear model fit using the (very clever) Armadillo C++ library by...

Read more »

Variations in the literal representation of Pi

March 11, 2010
By
Variations in the literal representation of Pi

The numbers system I am developing attempts to match numeric literals contained in a file against a database of interesting numbers. One of the things I did to quickly build a reasonably sized database of reliable values was to extract numeric literals from a few well known programs that I thought I could trust. R

Read more »

t-walk on the wild side

March 11, 2010
By
t-walk on the wild side

When I read in the abstract of the recent A General Purpose Sampling Algorithm for Continuous Distributions, published by Christen and Fox in Bayesian Analysis that We develop a new general purpose MCMC sampler for arbitrary continuous distributions that requires no tuning. I am slightly bemused. The proposal of the authors is certainly interesting and

Read more »

Clinical Reporting with R

March 11, 2010
By
Clinical Reporting with R

One of the main goals of analyzing clinical data is to produce a report. (What, you thought it was to make the world a better place?) The R Project has, of course, all the tools you need to perform the statistical analysis, calculate the tables of results, and present conclusions graphically. But how can you assemble all of that...

Read more »