Headless R / X11 and Cygwin/X

August 17, 2009
By

Running R on a Linux server in headless mode (i.e. producing graphics without XWindows running) can be tricky. Some people recommend using a virtual X framebuffer. However, I’ve found that the best approach (at least im my opinion) is to use the ...

Read more »

Potential Loss of Arable Land in the Central San Joaquin Valley, CA

August 17, 2009
By
Potential Loss of Arable Land in the Central San Joaquin Valley, CA

Rapid urban and sub-urban expansion in the San Joaquin Valley have resulted in the loss of millions of acres of prime farmland in the last 100 years. Approximately 11% of class 1 (irrigated) land and 7% of class 2 land have already been paved over in the Fresno-Madera region (first image below). Recent projections in the expansion of urban...

Read more »

High tech, low tech?

August 15, 2009
By
High tech, low tech?

Interesting article: http://www.iq.harvard.edu/blog/sss/archives/2006/01/tools_for_resea.shtml

Read more »

Cool articles in the New York Time’s: Statistics + R

August 14, 2009
By

so these articles are ‘old news,’ but here i am to blog it down before i forget. First article is entitled “For Today’s Graduate, Just One Word – Statistics,” and the second article is entitled “Data Analysts Captivated by R’s Power.” It really does feel re-enforcing and motivating when the NY Times write about your

Read more »

Everybody loves R

August 14, 2009
By

I found this articles in The New York Times" and I thought it would be nice to share them, By ASHLEE VANCE published on January 6, 2009, check them out, both are pretty interesting:http://www.nytimes.com/2009/01/07/technology/business-computing/07progr...

Read more »

Everybody loves R

August 14, 2009
By

I found this articles in The New York Times" and I thought it would be nice to share them, By ASHLEE VANCE published on January 6, 2009, check them out, both are pretty interesting:http://www.nytimes.com/2009/01/07/technology/business-computing/07progr...

Read more »

First 15 min. volatility impact on the day’s volatility

August 14, 2009
By
First 15 min. volatility impact on the day’s volatility

One night I was hooked on this post at elitetrader. I spent couple of hours to find, that a guy is cheating a bit and he didn’t reveal his strategy. Not big deal – free lunch is rear. So, I googled about that guy and one thing catch my attention. In one of his post

Read more »

Example 7.10: Get data from R into SAS

August 13, 2009
By
Example 7.10: Get data from R into SAS

In our previous entry, we described how to generate a dataset from SAS that could be used for analyses in R. Alternatively, someone primarily using R might want to test the new ”statistical graphics” procedures available starting with SAS 9.2. Her...

Read more »

ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 11)

August 13, 2009
By
ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 11)

This is the 11th post in a series attempting to recreate the figures in Lattice: Multivariate Data Visualization with R (R code available here) with ggplot2. Previous parts in this series: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9, Part 10. Chapter 11 – Manipulating the “trellis”

Read more »

random 0.2.1

August 12, 2009
By

A maintenance fix was applied to random: following the changes in release 0.2.0 a few months ago that reflected changes at the random.org site, we needed to make one more change in randomSequence. Thanks for Lynn Amon for spotting this. The new pac...

Read more »

random 0.2.1

August 12, 2009
By

A maintenance fix was applied to random: following the changes in release 0.2.0 a few months ago that reflected changes at the random.org site, we needed to make one more change in randomSequence. Thanks for Lynn Amon for spotting this. The new packag...

Read more »

random 0.2.1

August 12, 2009
By

A maintenance fix was applied to random: following the changes in release 0.2.0 a few months ago that reflected changes at the random.org site, we needed to make one more change in randomSequence. Thanks for Lynn Amon for spotting this. The new pac...

Read more »

Completion for java objects

August 9, 2009
By

As indicated in this thread, completion after the dollar operator can be customized by defining a custom names method. Here I am showing how to take advantage of this to display fields and methods of java references (jobjRef objects from the rJava ...

Read more »

Example 7.9: Get data from SAS into R

August 8, 2009
By
Example 7.9: Get data from SAS into R

Some people use both SAS and R in their daily work. They might be more familiar with SAS as a tool for manipulating data and R preferable for plotting purposes. While our goal in the book is to enable people to avoid having to switch back and forth, ...

Read more »

Trend Analysis with the Cox-Stuart test in R

August 8, 2009
By

The Cox-Stuart test is defined as a little powerful test (power equal to 0.78), but very robust for the trend analysis. It is therefore applicable to a wide variety of situations, to get an idea of the evolution of values obtained. The proposed method is based on the binomial distribution. In R there is no function to perform a...

Read more »

Trend Analysis with the Cox-Stuart test in R

August 8, 2009
By

The Cox-Stuart test is defined as a little powerful test (power equal to 0.78), but very robust for the trend analysis. It is therefore applicable to a wide variety of situations, to get an idea of the evolution of values obtained. The proposed method is based on the binomial distribution. In R there is no function to perform a...

Read more »

Two-way analysis of variance: two-way ANOVA in R

August 7, 2009
By

The one-way analysis of variance is a useful technique to verify if the means of more groups are equals. But this analysis may not be very useful for more complex problems. For example, it may be necessary to take into account two factors of variability to determine if the averages between the groups depend on the group classification...

Read more »

Two-way analysis of variance: two-way ANOVA in R

August 7, 2009
By

The one-way analysis of variance is a useful technique to verify if the means of more groups are equals. But this analysis may not be very useful for more complex problems. For example, it may be necessary to take into account two factors of variability to determine if the averages between the groups depend on the group classification...

Read more »

Additive vs. dominance two-allele genetic model by DIC

August 7, 2009
By

Two-allele model has alleles A1 and A2 and genotypes A1A1, A1A2, and A2A2. This model can be fitted using only additive effect (restricted model) or additve+dominance effect. (full model) The later model has one parameter more than the former. I was using this model lately and got weird DIC results - the full model had less number...

Read more »

Additive vs. dominance two-allele genetic model by DIC

August 7, 2009
By

Two-allele model has alleles A1 and A2 and genotypes A1A1, A1A2, and A2A2. This model can be fitted using only additive effect (restricted model) or additve+dominance effect. (full model) The later model has one parameter more than the former. I was using this model lately and got weird DIC results - the full model had less number...

Read more »

CacheSweave

August 6, 2009
By
CacheSweave

I finally figured out how to use the R package "cachesweave". The trick is that the code chunks must follow some order, like the following:-----------------------------------------------------------=setCacheDir("testcache")@=library(Zelig)library(memis...

Read more »

R 64 bit on Mac OSX with ESS

August 6, 2009
By

So today I compiled 64 bit R 2.91 on Mac OS X   10.5.7 in order to get maximum speed for my analyses. The speed increase I got was 15-25 %, when I ran some tests with matrix calculation and intensive loops. Note that you can also download optimized binaries from  http://r.research.att.com/, although they are

Read more »

RSRuby in the IRB console

August 6, 2009
By
RSRuby in the IRB console

R is terrific, of course, for all your statistical needs. But those data structures! “Everything is a list.” Leading to such wondrous ways to access variables as “p <- Meta(gds)$platform", or "last <- mylist]])]". Sometimes, you want something more familiar. An array, a hash, a hash of arrays. Or, you may

Read more »

Simple linear regression

August 5, 2009
By

We use the regression analysis when, from the data sample, we want to derive a statistical model that predicts the values of a variable (Y, dependent) from the values of another variable (X, independent). The linear regression, which is the simplest and most frequent relationship between two quantitative variables, can be positive (when X increase, Y increase too) or...

Read more »

Simple linear regression

August 5, 2009
By

We use the regression analysis when, from the data sample, we want to derive a statistical model that predicts the values of a variable (Y, dependent) from the values of another variable (X, independent). The linear regression, which is the simplest and most frequent relationship between two quantitative variables, can be positive (when X increase, Y increase too) or...

Read more »

R 64 bit on Mac OSX with ESS

August 5, 2009
By

Table of contents Compiling Getting ESS to work The current R version comes also with a 64-bit version so its not necessary to compile it from source anymore, but you do need to tell ESS how to use the 64bit version So today I compiled 64 bit R 2.91 on Mac OS X 10.5.7 in order to get maximum...

Read more »

R 64 bit on Mac OSX with ESS

August 5, 2009
By

Table of contents Compiling Getting ESS to work The current R version comes also with a 64-bit version so its not necessary to compile it from source anymore, but you do need to tell ESS how to use the 64bit version So today I compiled 64 bit R 2.91 on Mac OS X 10.5.7 in order to get maximum...

Read more »

Code Snippet : List of CRAN packages

August 5, 2009
By

This is a really simple code snippet that shows how to get the list of CRAN packages and their titles from the html page html page (toulouse mirror in this example). ... Note that R has the available.packages function, but it does not give th...

Read more »

Locate the position of CRAN mirror sites on a map using Google Maps

August 5, 2009
By
Locate the position of CRAN mirror sites on a map using Google Maps

Inspired by this post (suggested here by the always useful Revolutions blog), I attempted to plot the position of CRAN mirrors on a map taking advantage of the nice R package RgoogleMaps (check the dependencies!). Below the code: library(XML) # downlo...

Read more »