## Syntax highlighting of R code at WordPress.com

May 20, 2011
By

If your WordPress blog is hosted at WordPress.com (like this one), you may know that source code in posts is formatted and highlighted using a shortcode, as explained here. Until recently, R was not on the list of supported languages (neither was Perl), but I noticed today that both of them are now supported. This

## Porting Stata-like Marginal Effects to LaTeX

May 19, 2011
By

The TimeSeriesIreland Blog posted an excellent start on a function that automatically computes marginal effects for probit and logit models. As I have always wanted an easy-to-use function that computes and reports marginal effects in R, I was elated ...

## Porting Stata-like Marginal Effects to LaTeX

May 19, 2011
By

The TimeSeriesIreland Blog posted an excellent start on a function that automatically computes marginal effects for probit and logit models. As I have always wanted an easy-to-use function that computes and reports marginal effects in R, I was elated ...

## [Project Euler] – Problem 57

May 19, 2011
By

It is possible to show that the square root of two can be expressed as an infinite continued fraction. √ 2 = 1 + 1/(2 + 1/(2 + 1/(2 + … ))) = 1.414213… By expanding this for the first four iterations, we get: Read More: 547 Words Totally

## Friday fun with: Google Trends

May 19, 2011
By

Some years ago, Google discovered that when people are concerned about influenza, they search for flu-related information and that to some extent, search traffic is an indicator of flu activity. Google Flu Trends was born. Illness is sweeping through our department this week and I have succumbed. It’s not flu but at one point, I

## More fun with boxplots

May 19, 2011
By

Here are a few more plotting options for boxplots: Let’s start plotting the full set plot(b\$mod, b\$x) Plot labels for a subset in full set plot (label all points x < -1) text(subset(b\$mod, b\$x < -1), subset(b\$x, b\$x < -1), … Continue reading →

## More Command-Line Text Munging Utilities

May 19, 2011
By

In a previous post I linked to gcol as a quick and intuitive alternative to awk. I just stumbled across yet another set of handy text file manipulation utilities from the creators of the BEAGLE software for GWAS data imputation and analysis. In additio...

## More Command-Line Text Munging Utilities

May 19, 2011
By

In a previous post I linked to gcol as a quick and intuitive alternative to awk. I just stumbled across yet another set of handy text file manipulation utilities from the creators of the BEAGLE software for GWAS data imputation and analysis. In additio...

## Hadley Wickham’s R Development Master Class coming to SF

May 19, 2011
By

Hadley Wickham, the Rice professor and prolific R hacker best known as the author of the ggplot2 graphics package, will be coming to San Francisco June 8-9 to deliver his new R Development Master Class (in conjunction with Revolution Analytics). This course will build on the skills of basic R programmers with instruction in advanced R programming techniques, development...

## Converting vectors to numeric in mixed-type dataframe

May 19, 2011
By

Coercing variables of character and numeric type into a single dataframe yields all vectors to be defined as factors all <- data.frame(cbind(site, year, model, x, y, z)) The following converts selected variables from “factor” back to “numeric” all\$x <- as.numeric(x) … Continue reading →

## Bar Graphs in ggplot2

May 19, 2011
By

As part of my continuing fun and games getting to grips with ggplot2′s vast multitude of functions, here I give …Continue reading »

## Applying PDQ in R to Load Testing

May 19, 2011
By

PDQ is a library of functions that helps you to express and solve performance questions about computer systems using the abstraction of queues. The queueing paradigm is a natural choice because, whether big (a web site) or small (a laptop), all computer systems can be represented as a network or circuit of buffers and a buffer is a...

## Applying PDQ in R to Load Testing

May 19, 2011
By

PDQ is a library of functions that helps you to express and solve performance questions about computer systems using the abstraction of queues. The queueing paradigm is a natural choice because, whether big (a web site) or small (a laptop), all computer systems can be represented as a network or circuit of buffers and a buffer is a...

## R-bloggers

May 18, 2011
By

As I decided to try and blog a little more often now, and touch on "R" every now and then, I decided to take R-bloggers up on their standing offer to include R-related feeds at their site. So, everything I tag with "rstats" (you can guess where that ca...

## R-bloggers

May 18, 2011
By

As I decided to try and blog a little more often now, and touch on "R" every now and then, I decided to take R-bloggers up on their standing offer to include R-related feeds at their site. So, everything I tag with "rstats" (you can guess where that ca...

## Mapping locations in R with the Data Science Toolkit

May 18, 2011
By

Pete Warden's Data Science Toolkit (which we mentioned briefly last week) is an open-source information server that provides an API you can query for information useful for building data science applications, like identifying proper names in unstructured text, or converting IP addresses to lat/long coordinates. You can make queries via the Web interface or by direct interface to the...

May 18, 2011
By

RStudio is a graphical user interface for R. Or as the developers put it. RStudio™ is a new integrated development environment (IDE) for R. RStudio combines an intuitive user interface with powerful coding tools to help you get the most out of R.   While there have been a few projects (e.g. RCommander, RkWard, JaguaR)

## Wonderful New Blog TimeSeriesIreland

May 18, 2011
By

I returned from Scotland to find a wonderful new blog from Ireland http://timeseriesireland.wordpress.com.  To highlight his work, I thought I would apply his most recent post AIB Stock Price, EGARCH-M, and rgarch to the S&P 500.  Clearly...

## Fractional Factorial Designs using FrF2

May 18, 2011
By

The FrF2 package for R can be used to create regular and non-regular Fractional Factorial 2-level designs. It is reasonably straightforward to use. First step is to install the package then make it available for use in the current session: require(FrF2) A basic call to the main functino FrF2 specifies the number of runs in

## Vehicle Routing Problem

May 18, 2011
By

This is a follow-up to a previous question on VRP. I investigated R libraries and several other options to solve VRP and decided to build a custom desktop application using open source libraries from COIN-OR. Screenshots attached below.Leave a comment ...

## Vehicle Routing Problem

May 18, 2011
By

This is a follow-up to a previous question on VRP. I investigated R libraries and several other options to solve VRP and decided to build a custom desktop application using open source libraries from COIN-OR. Screenshots attached below.Leave a comment ...

## Stata-like Marginal Effects for Logit and Probit Models in R [2]

May 18, 2011
By

My thanks to those who emailed comments and suggestions for my ‘mfx’ function, I’m happy that I could fill a void for some people. I also received a request/suggestion from Tony Cookson, along with a helpful fix for a bug in the code, to include an option that would allow the user to specify values

## The RDSTK Presentation at Denver R Users Group

May 18, 2011
By

Last night I presented a talk at the DRUG introducing the R wrapper for the Data Science Toolkit.  Lots of good questions, good forking, and good beer afterwards at Freshcraft.  The slides are given below.

## New R User Groups in Turin, Belgrade

May 18, 2011
By

Two new local R user groups in Europe to announce this week. For R users in Serbia, there's a new group based in Belgrade. You can find more information about the group and upcoming meetings at the Croatian-language blog Sav tar R. And for R users in northern Italy, there's a new group based in Turin: Torino R net...

## Resources for Learning R

May 17, 2011
By

The information below will be periodically updated at the folowing permanent link: http://www.backsidesmack.com/r-resources/ Searching for information on R sucks. Not only is the language name a letter of the alphabet (an ignominy it shares with C and some less well known languages), there is Pearson’s r and the coefficient of determination, R squared! if you…

## Stata-like Marginal Effects for Logit and Probit Models in R

May 17, 2011
By
$Stata-like Marginal Effects for Logit and Probit Models in R$

Although this blog’s primary focus is time series, one feature I missed from Stata was the simple marginal effects command, ‘mfx compute’, for cross-sectional work, and I could not find an adequate replacement in R. To bridge this gap, I’ve written a (rather messy) R function to produce marginal effects readout for logit and probit

## Simulating Win/Loss streaks with R rle function

May 17, 2011
By

The following script allows you to simulate sample runs of Win, Loss, Breakeven streaks based on a random distribution, using the run length encoding function, rle in R. Associated probabilities are entered as a vector argument in the sample function.Y...

## A survey of the [60′s] Monte Carlo methods [2]

May 17, 2011
By

The 24 questions asked by John Halton in the conclusion of his 1970 survey are Can we obtain a theory of convergence for random variables taking values in Fréchet spaces? Can the study of Monte Carlo estimates in separable Fréchet spaces give a theory of global approximation? When sampling functions, what constitutes a representative sample