Making prettier network graphs with sna and igraph

December 18, 2012
By
Making prettier network graphs with sna and igraph

We’ve had some requests for ideas about how to make prettier network graphs, so here is one example, using the sna package for plotting, and the igraph package to calculate PageRank. The help file for gplot is pretty self-explanatory, but Melissa Clarkson has produced the most thorough and impressive guide for any R...

Read more »

R Shiny svg with no d3

December 18, 2012
By
R Shiny svg with no d3

Paul Murrell’s Technical Report reminded me that svg in the browser does not require d3.  With his package gridSVG, we can do all sorts of wonderful things without leaving R.  I think I prefer the power of d3.js, but here is an example (doe...

Read more »

A Quick Note in Weighting with nlme

December 18, 2012
By

I’ve been doing a lot of meta-analytic things lately. More on that anon. But one quick thing that came up was variance weighting with mixed models in R, and after a few web searches, I wanted to post this, more … Continue reading →

Read more »

Even more Microsoft Postdocs

December 18, 2012
By
Even more Microsoft Postdocs

Microsoft Research NYC seeks outstanding applicants for 2-year postdoctoral researcher positions. We welcome applicants with a strong academic record in one of the following areas: * Computational social science: http://research.microsoft.com/cssnyc * Online experimental social science: http://research.microsoft.com/oess_nyc * Algorithmic economics and market design: http://research.microsoft.com/algorithmic-economics/ * Machine learning: http://research.microsoft.com/mlnyc/ The post Even more Microsoft Postdocs appeared first on Decision Science News.

Read more »

NHS Winter Situation Reports: Shiny Viewer v2

December 18, 2012
By
NHS Winter Situation Reports: Shiny Viewer v2

Having got my NHS Winter sitrep data scraper into shape (I think!), and dabbled with a quick Shiny demo using the R/Shiny library, I thought I’d tidy it up a little over the weekend and long the way learn a few new presentation tricks. To quickly recap the data availability, the NHS publish a weekly

Read more »

RStudio and TeXworks working great together

December 18, 2012
By
RStudio and TeXworks working great together

Just now writing a reproducible report in R using RStudio on Ubuntu. So the source is a .Rnw file and I am compiling it with knitr. For the narrative part of the report it is a shame that RStudio doesn’t have autocomplete for latex styles, headings etc. But I just realised that it is possible

Read more »

Density Plot with ggplot

December 18, 2012
By
Density Plot with ggplot

This is a follow on from the post Using apply sapply and lappy in R.The dataset we are using was created like so:m <- matrix(data=cbind(rnorm(30, 0), rnorm(30, 2), rnorm(30, 5)), nrow=30, ncol=3)Three columns of 30 observations, normally distributed with means of 0, 2 and 5. We want a density plot to compare the distributions of the three columns...

Read more »

Using apply, sapply, lapply in R

December 18, 2012
By

This is an introductory post about using apply, sapply and lapply, best suited for people relatively new to R or unfamiliar with these functions. There is a part 2 coming that will look at density plots with ggplot, but first I thought I would go on a tangent to give some examples of the apply family, as they...

Read more »

From d3 to pdf (hopefully knitr) with R Shiny

December 17, 2012
By
From d3 to pdf (hopefully knitr) with R Shiny

Although I think I like the d3, R, and Shiny team the best, I could definitely envision a big need for multi-page pdf reports created with R, knitr, and latex delivered to the browser with Shiny.  Shiny helpfully provides pre-built functionality t...

Read more »

R / Finance 2013 Call for Papers

December 17, 2012
By

The text below just went out to r-sig-finance along with updates to the R/Finance website and its Call for Papers page. Call for Papers: R/Finance 2013: Applied Finance with R May 17 and 18, 2013 University of Illinois, Chicago, IL, USA The ...

Read more »

RcppArmadillo 0.3.6.1

December 17, 2012
By

A first minor bug-fix update by Conrad to the 3.6 series of Armadillo arrived today as version 3.6.1, and we prepared a corresponding version 0.3.6.1 of RcppArmadillo, our wrapper for R and Armadillo. This is now on CRAN, and the changes are summari...

Read more »

How to select and merge R data frames with SQL

December 17, 2012
By

The R language provides many features in the language for selecting data from data frames: the "[" operator, logical functions, and utility functions like "subset". But if you know SQL (the query language ubiquitous in database systems), none of this is necessary. With the sqldf package, you can just pretend that your data frame is a database, and use...

Read more »

line width in R and in Illustrator

December 17, 2012
By
line width in R and in Illustrator

I've drawn figure in R with lwd=1, e.g.pdf('test.pdf')plot(1:10, type='o', lwd=2, axes=F)box(lwd=1, col='red')dev.off()And then you open the PDF in Illustrator, you will see the border width is 0.75pt, and the line is 1.5pt, which seems that the unit of 1 in R is 0.75pt in Illustrator.How is this defined? Where can I change it?I found the answer by...

Read more »

Stan and RStan 1.1.0

December 17, 2012
By
Stan and RStan 1.1.0

We’re happy to announce the availability of Stan and RStan versions 1.1.0, which are general tools for performing model-based Bayesian inference using the no-U-turn sampler, an adaptive form of Hamiltonian Monte Carlo. Information on downloading and installing and using them is available as always from Stan Home Page: http://mc-stan.org/ Let us know if you have The post Stan...

Read more »

My R naming nemesis

December 17, 2012
By

When learning a new language I try to make an effort to write it like a native developer. R has one language feature that has been severely testing my desire to write like a native and this afternoon I realized that most of the people reading my code will also experience the same jarring sensation

Read more »

R/iGraph Holiday network animation and How-to tips

December 17, 2012
By
R/iGraph Holiday network animation and How-to tips

The animation embedded in this post was done using R and the iGraph package and was, frankly, a great deal more work than I thought it would be when I started. What kept me going was a desire to express a wish for the New Year while also experimenting with some functionality that might be

Read more »

Differential Isoform Expression With RNA-Seq: Are We Really There Yet?

December 17, 2012
By
Differential Isoform Expression With RNA-Seq: Are We Really There Yet?

In case you missed it, a new paper was published in Nature Biotechnology on a method for detecting isoform-level differential expression with RNA-seq Data:Trapnell, Cole, et al. "Differential analysis of gene regulation at transcript resolution with RN...

Read more »

Video: SQL queries in R using sqldf package

December 17, 2012
By

This video covers how to run SQL queries using the ‘sqldf’ package within R. This sqldf tutorial was part of a Keystone Solutions podcast discussion about data science and what skills beginning analysts should be learning to improve their skill set. The example files from this tutorial can be downloaded from this link: Example Data Video: SQL...

Read more »

Controlling Axes of R Plots

December 17, 2012
By
Controlling Axes of R Plots

In this post, I describe how to gain control over the axes in your R plots.

Read more »

Florence Nightingale and the importance of Data Visualization

December 17, 2012
By
Florence Nightingale and the importance of Data Visualization

Florence Nightingale is held as a heroine for the British people because of her work during the Crimean War. However, she would not have been so fairly recognised if she had not been also a superb statistician: in a brilliant … Continue reading →

Read more »

Who are the pollinators? (with R plot)

December 17, 2012
By
Who are the pollinators? (with R plot)

I’ve been dreaming on writing a manuscript about who are the pollinators for a while, but it looks I’m not going to have the time soon, so here is an early draft of what the main figure should look like: It’s surprisingly … Continue reading →

Read more »

analyze the behavioral risk factor surveillance system (brfss) with r and monetdb

December 17, 2012
By

experimental.  the behavioral risk factor surveillance system (brfss) aggregates behavioral health data from 400,000 adults via telephone every year.  it's um *clears throat* the largest telephone survey in the world and it's gotta lotta uses...

Read more »

The second R UseR meetup

December 17, 2012
By

The second R UseR meetup was 16 october. Kutergin Alex presented an overview of the packages for high-performance computing. HPC in R from arbuzov1989

Read more »

The Inverse Herfindahl–Hirschman Index as an “Effective Number of” Parties

December 17, 2012
By
The Inverse Herfindahl–Hirschman Index as an “Effective Number of” Parties

I learned of the passing of Albert Hirschman on December 11, and while better and more instructive tributes to his life can be read elsewhere, I wanted to focus on a little piece of Hirschman’s work that I use all the time: the (inverse) Herfindahl–Hirschman Index. The HHI is basically a measure of market concentration, but...

Read more »

A look at historical Value at Risk

December 17, 2012
By
A look at historical Value at Risk

Historical Value at Risk (VaR) is very popular because it is easy and intuitive: use the empirical distribution of some specific number of past returns for the portfolio. Previously “The estimation of Value at Risk and Expected Shortfall” included an R function to estimate historical VaR. Generating portfolios A useful tool to explore risk models … Continue reading...

Read more »

True Significance of a T Statistic

December 17, 2012
By
True Significance of a T Statistic

The example is more of a statistical exercise that  shows the true significance and the density curve of simulated random normal data.  The code can be changed to generate data using either a different mean and standard deviation or a different distribution altogether. This extends the idea of estimating pi by generating random normal data to determine

Read more »

Now I see it! K-means cluster analysis in R

December 17, 2012
By
Now I see it! K-means cluster analysis in R

Of course, a picture on a computer monitor is a coloured plot of x and y coordinates or pixels. Still, I was smitten by David Sparks' posts on is.r(), where he shows how easy it is to read images into R to analyse them. In two posts , he replicates functionality of image manipulation...

Read more »

High-Powered Statistical Computing On the iPad

December 17, 2012
By
High-Powered Statistical Computing On the iPad

It's winter break… and as any academic knows, breaks are “a good time to get work done.” For the Christmas break, many of us have to travel home to see family members. One of the great privileges of being an academic is that you don't necessarily need to be in your office to get research

Read more »

High-Powered Statistical Computing On the iPad

December 17, 2012
By
High-Powered Statistical Computing On the iPad

It's winter break… and as any academic knows, breaks are “a good time to get work done.” For the Christmas break, many of us have to travel home to see family members. One of the great privileges of being an academic is that you don't necessarily need to be in your office to get research

Read more »

Sponsors