Bipartite networks and R

January 14, 2011
By
Bipartite networks and R

Earlier, I posted about generating networks from abundance distributions that you specify. If this post was interesting, check out Jeff Kilpatrick's website, where he provides code he produced in R and Octave to compare real bipartite networks to ones ...

Read more »

Statistical podcast: Random and Pseudorandom

January 14, 2011
By
Statistical podcast: Random and Pseudorandom

This morning when I downloaded the latest version of In our time, I was pleased to see that this weeks topic was “Random and Peudorandom.” If you’re not familiar with “In our time”, then I can I definitely recommend the series. Each week three academics and Melvyn Bragg discuss a particular topic from history, science,

Read more »

Changing phylogeny tip labels in R

January 14, 2011
By
Changing phylogeny tip labels in R

During the process of molecular systematic research, specimens are given code names and numbers to keep track of data through the pipeline. These can contain a lot of information of relevance to the researcher, but unfortunately are meaningless to others who aren't as involved with the data. On publication, it is necessary to change the names from the code...

Read more »

Changing phylogeny tip labels in R

January 14, 2011
By
Changing phylogeny tip labels in R

During the process of molecular systematic research, specimens are given code names and numbers to keep track of data through the pipeline. These can contain a lot of information of relevance to the researcher, but unfortunately are meaningless to others who aren't as involved with the data. On publication, it is necessary to change the names from the code...

Read more »

Remove all rows of an R dataframe

January 13, 2011
By
Remove all rows of an R dataframe

I should have probably figured this out a long time ago, but as I get deeper into programming with R, I am finding the need to remove all rows from a dataframe.  I was making this alot harder than it had to be. your.df<- your.df Replace your.df with, your dataframe and you are good

Read more »

Visualizing the Haiti earthquake with R

January 13, 2011
By

Yesterday was the one-year anniversary of the Haiti earthquake, and to put the scale of the event in context San Francisco bureau chief for New Scientist magazine and data journalist Peter Aldhous created a time-lapse animation of all large earthquakes in the last year, beginning with the 7.0-magnitude Haiti event. Peter used USGS data, R and Flash to generate...

Read more »

EPL Fantasy Football: Best overall, home and away teams

January 13, 2011
By
EPL Fantasy Football: Best overall, home and away teams

I've refined the R code to pick the best fantasy soccer team by using more granular player performance data (available publicly). Here are the best overall, home and away teams. The constraints used are: 1) Number of goalkeepers = 12) Nu...

Read more »

EPL Fantasy Football: Best overall, home and away teams

January 13, 2011
By
EPL Fantasy Football: Best overall, home and away teams

I've refined the R code to pick the best fantasy soccer team by using more granular player performance data (available publicly). Here are the best overall, home and away teams. The constraints used are: 1) Number of goalkeepers = 12) Nu...

Read more »

Survival paper (update)

January 13, 2011
By
Survival paper (update)

In a recent post, I discussed some  statistical consultancy I was involved with. I was quite proud of the nice ggplot2 graphics I had created. The graphs nicely summarised the main points of the paper: I’ve just had the proofs from the journal, and next to the graphs there is the following note: It is

Read more »

gnmplot

January 13, 2011
By
gnmplot

I'm writing a new package that will create nice publication quality graphics of genome information. It's really an adaptor sitting between the biomaRt and ggplot2 packages. Here is the code so far: ## this function integrates 3 steps to creating a g...

Read more »

prettyR

January 13, 2011
By

I have just remembered a package called 'prettyR' that pretty much does what it says. It makes R code more readable.. so an example from my forthcoming genomeplot package (see forthcoming blog entry):   ## this function integrates 3 steps to creat...

Read more »

R: An introduction for psychologists

January 13, 2011
By

Here are the slides from the Introduction to R session Danny Kaye and I ran at the BPS Mathematics, Statistics & Computing section CPS Workshop (13 December 2010, Nottingham Trent University).

Read more »

More climate extremes, or simply global warming ?

January 12, 2011
By
More climate extremes, or simply global warming ?

In the paper on the heat wave in Paris (mentioned here) I discussed changes in the distribution of temperature (and autocorrelation of the time series). During the workshop on Statistical Methods for Meteorology and Climate Change today (here) I o...

Read more »

R Code for googleVis Demo

January 12, 2011
By
R Code for googleVis Demo

# ------------------------------------------------------------------# | PROGRAM NAME: googleVis_R# | DATE: 1/12/11 # | CREATED BY: Matt Bogard# | PROJECT FILE: # |----------------------------------------------------------------# | PURPOSE: ...

Read more »

R: Attack of the hair-trigger bees?

January 12, 2011
By
R: Attack of the hair-trigger bees?

In their book “Complex Adaptive Systems”, authors Miller and Page create a theoretic model for bee attacks, based on the real, flying, honey-making, photogenic stingers. Suppose the hive is threatened by some external creature. Some initial group of guard bees sense the danger and fly off to attack. As they go, they lay down a

Read more »

CosmoPMC released

January 12, 2011
By
CosmoPMC released

Martin Kilbinger, an astronomer (cosmologist) with whom we had worked on population Monte Carlo for cosmological inference , has made the PMC C codes available on the CosmoPMC webpage. He has also written a CosmoPMC manual that is now available from arXiv. And he very kindly associated me to

Read more »

Initial Work on a Post Not Yet Completed

January 12, 2011
By
Initial Work on a Post Not Yet Completed

It’s no secret I have been learning R for some time now, and one of the best resources out there is the hashtag rstats on twitter (#rstats).  There is a tremendous community of active users who are always willing to help, but not to mention, you can get a first hand view of some of

Read more »

Winners of Mozilla Open Data Competition announced

January 12, 2011
By
Winners of Mozilla Open Data Competition announced

The winners of the Mozilla Open Data Visualization competition "How Do People Use Firefox" have been announced. The competition attracted 32 entries, each visualizing an aspect of data collected in the Mozilla Test Pilot program to reveal insights about how people use the popular open-source browser Firefox. I was honoured to be asked to participate in the judging of...

Read more »

In The Wild: rApache 1.1.14 Released

January 12, 2011
By
In The Wild: rApache 1.1.14 Released

Don’t be scared. Really. It’s just another minor release. After working with one of the venerable developers at metamx, it was discovered that rApache would crash when invoking the .Call functions outside the context of a web request. Get the sour...

Read more »

Random variable generation (Pt 3 of 3)

January 12, 2011
By
Random variable generation (Pt 3 of 3)

Ratio-of-uniforms This post is based on chapter 1.4.3 of Advanced Markov Chain Monte Carlo.  Previous posts on this book can be found via the  AMCMC tag. The ratio-of-uniforms was initially developed by Kinderman and Monahan (1977) and can be used for generating random numbers from many standard distributions. Essentially we transform the random variable of

Read more »

Usage of R functions "table" & "ifelse" when NA’s exist

January 12, 2011
By

Most of the time I came across now and then in help posts questions regarding the mismatching total count of observations after employing the R functions "table" and "ifelse". This usually creates frustration among fresh/part-time practitioners which e...

Read more »

Usage of R functions "table" & "ifelse" when NA’s exist

January 12, 2011
By

Most of the time I came across now and then in help posts questions regarding the mismatching total count of observations after employing the R functions "table" and "ifelse". This usually creates frustration among fresh/part-time practitioners which e...

Read more »

RProtoBuf 0.2.2

January 12, 2011
By

Thanks to two patches by Murray Stokely, we have a nice new minor release 0.2.2 of RProtoBuf out on CRAN. RProtoBuf provides GNU R bindings for the Google Protobuf data encoding library used and released by Google. The NEWS file entry follows bel...

Read more »

Two short Bayesian courses in South’pton

January 12, 2011
By
Two short Bayesian courses in South’pton

An announcement for two short-courses on Introduction to  Bayesian Analysis and MCMC, and Hierarchical Modelling of Spatial and Temporal Data by Alan Gelfand (Duke University, USA) and Sujit Sahu (University of Southampton, UK), are to take place in Southampton on June 7-10, this year. Course 1: Introduction to Bayesian Analysis and MCMC. Date: June 7,

Read more »

The number 1 novice quant mistake

January 12, 2011
By
The number 1 novice quant mistake

It is ever so easy to make blunders when doing quantitative finance.  Very popular with novices is to analyze prices rather than returns. Regression on the prices When you want returns, you should understand log returns versus simple returns. Here we will be randomly generating our “returns” (with R) and we will act as if … Continue reading...

Read more »

Create Motion Charts in R with the GoogleVis package

January 11, 2011
By

Hans Rosling popularized Motion Charts -- 2-d scatterplots that animate over time -- with the GapMinder project. Motion Charts were taken to their augmented-reality extreme in this clip from the BBC programme, The Joy of Stats, but now you can create similar (if less audacious) motion charts for yourself with just R and a Flash-enabled browser. First, you'll need...

Read more »

Platinum – Palladium relationship

January 11, 2011
By
Platinum – Palladium relationship

Emacs Starter Kit for the Social Sciences now gets ESS via ELPA

January 11, 2011
By

More starter kit stuff. Up till now, the Emacs Starter Kit for the Social Sciences included ESS, but bundled it with the git repo. A better option would be to have it installed via the package mechanism, like AucTeX is now, but it’s not included. The ELPA system is allows you to specify repositories besides

Read more »

Introducing the Lowry Plot

January 11, 2011
By
Introducing the Lowry Plot

Here at the Health and Safety Laboratory* we’re big fans of physiologically-based pharmacokinetic (PBPK) models (say that 10 times fast) for predicting concentrations of chemicals around your body based upon an exposure. These models take the form of a big system of ODEs. Because they contain many equations and consequently many parameters (masses of organs

Read more »