Making Emacs Buffer Names Unique Using the Uniquify Package

October 5, 2009
By
Making Emacs Buffer Names Unique Using the Uniquify Package

If you ever work in Emacs with different files that all have the same name, this tip may be very useful for you. In my experience, this most often happens when working with Makefiles from multiple projects or directories. Assuming you have a buffer visiting a file called Makefile, by default Emacs will call the

Read more »

Expressions in expresssion passed to functions that return functions

October 5, 2009
By

OK in the last two tips I explained how functions can return functions and how to leverage expressions. Now lets get complicated. This is really how my testing code works; expressions embeded in expressions that are passed to functions that return fu...

Read more »

Expressions!

October 5, 2009
By

I never really saw a use for these until I started testing code en mass. I found myself doing lots and lots of copy and paste. I heard it from Steve McConnell in his Code Complete book where he said if you are copying and pasting you are programming ...

Read more »

Functions from functions

October 5, 2009
By

I've been really busy lately working on my dissertation and applying for jobs. But I've found a few really cool things that I'd like to share. These are pretty complex things so lets break it up into a few tips. First Tip: did you know that you can re...

Read more »

Oil vs gas

October 5, 2009
By
Oil vs gas

Recently, friend of my, got investment advise from his broker – long gas, because the price of gas is very low compared to oil. The broker didn’t indicate neither profit target or stop loss… I got hooked on the idea. First of all, I ran linear regression on monthly prices of oil and gas from 01-12-1993 to

Read more »

Including R Code in a Blog Post

October 5, 2009
By
Including R Code in a Blog Post

This post discusses ways of including formatted code in a blog post.I often write posts that include computer code. This might be R code, SPSS syntax, an Inquisit script, or a Visual Basic Macro.The Problem:Initially I did not know how to include this ...

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By

This post originally appeared on my Wordpress blog on October 4, 2009. I present it here in its original form. In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading...

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By

This post originally appeared on my Wordpress blog on October 4, 2009. I present it here in its original form. In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading...

Read more »

Using R to Analyze Baseball Games in “Real Time”

October 4, 2009
By
Using R to Analyze Baseball Games in “Real Time”

In order to honor the last day of the 2009 MLB regular season (excepting the Twins/Tigers tiebreaker Tuesday night), I was reading a book that combines a few of my favorite thing: statistics, R, and baseball. The book, by Joseph Adler, is called Baseball Hacks, and I highly recommend it if you are interested in

Read more »

Calculating Scale Scores for Psychological Tests

October 4, 2009
By
Calculating Scale Scores for Psychological Tests

This post discusses how to calculate scale scores for multi-item scales. A lot of psychological research uses multi-item scales (e.g., personality tests, symptoms check lists, surveys, etc.). This post focuses on the issues involved with computing thes...

Read more »

Using doc-view with auto-revert to view LaTeX PDF output in Emacs

October 3, 2009
By
Using doc-view with auto-revert to view LaTeX PDF output in Emacs

When I am authoring a document in Emacs, such as a report or my CV, it is useful for me to compile the source file periodically to see what the resulting file PDF looks like. I used to run a separate PDF viewer to look at the output, but I now have a complete Emacs

Read more »

Data Mining and Statistics Video Course

October 3, 2009
By
Data Mining and Statistics Video Course

David Mease has an online course presented with complete videos (Statistics 202: Statistical Aspects of Data Mining ). The course uses Excel and R.I might update this post with a few notes below on what is covered as I get a chance to watch t...

Read more »

smoothScatter in base R

October 2, 2009
By
smoothScatter in base R

smoothScatter function is now available also in base R - in the recommended package graphics that is shipped with R. Originally this function was in the genepplotter package from Bioconductor. I really like it since it can nicely plot large datasets. B...

Read more »

smoothScatter in base R

October 2, 2009
By
smoothScatter in base R

smoothScatter function is now available also in base R - in the recommended package graphics that is shipped with R. Originally this function was in the genepplotter package from Bioconductor. I really like it since it can nicely plot large datasets. B...

Read more »

Make Safari behave as Firefox

Make Safari behave as Firefox

Some weeks ago I switched from Firefox to Safari. While Safari is -- in my experience -- quicker, better looking, and has Top Sites, I was also missing some functionality of firefox. To be more precise, I missed the 'search when start typing' option, a...

Read more »

R Object Tooltips in ESS

October 1, 2009
By

This post originally appeared on my Wordpress blog on October 1, 2009. I present it here in its original form. Whether at work or for personal projects, I use ESS a lot to perform interactive data analyses. The ability to write, edit, and su...

Read more »

R Object Tooltips in ESS

October 1, 2009
By

This post originally appeared on my Wordpress blog on October 1, 2009. I present it here in its original form. Whether at work or for personal projects, I use ESS a lot to perform interactive data analyses. The ability to write, edit, and su...

Read more »

R Object Tooltips in ESS

October 1, 2009
By
R Object Tooltips in ESS

Whether at work or for personal projects, I use ESS a lot to perform interactive data analyses. The ability to write, edit, and submit R commands to an interactive R process is simply something I cannot imagine analyzing data without. An example One thing that I end up having to do a lot is inspect

Read more »

R: The Dummies Package

September 30, 2009
By

R-2.9.2 was released in August. While R can be considered stable and battle-ready, it is also far from stagnation. It is humbling to see such an intelligent and vibrant community helping CRAN grow faster than ever. Every day I see a new package or read a new comment on R-Help

Read more »

Measuring performance of functions in R

Measuring performance of functions in R

In R you can use the system.time(function) function to test the time it takes to execute a function. Because I had to do some extended performance testing in R, I wrote a new function based on system.time which gives you the possibility to run multiple...

Read more »

Example 7.14: A simple graphic of sales

September 29, 2009
By
Example 7.14: A simple graphic of sales

In this example, we show a simple plot of the sales rank data read in as shown in example 7.13.SASIn SAS, we use the symbol statement (section 5.3) to request small (with the h option) dots (with the v option, and that the dots not be connected (with the i option. (See sections 5.2.2, 5.3.9 for more details.)we...

Read more »

RInside release 0.1.1, and a fresh example

September 29, 2009
By

Last week's 0.1.0 release of RInside, and the first to have been published on CRAN, still had some issues with builds and use on OS X. Thanks to testing and fixes by Jan de Leeuw, Jeff Horner and particularly Simon Urbanked, things are said to be better now with the new release 0.1.1 which went onto CRAN yesterday. So no new features,...

Read more »

RInside release 0.1.1, and a fresh example

September 29, 2009
By

Last week's 0.1.0 release of RInside, and the first to have been published on CRAN, still had some issues with builds and use on OS X. Thanks to testing and fixes by Jan de Leeuw, Jeff Horner and particularly Simon Urbanked, things are said to be bette...

Read more »

RInside release 0.1.1, and a fresh example

September 29, 2009
By

Last week's 0.1.0 release of RInside, and the first to have been published on CRAN, still had some issues with builds and use on OS X. Thanks to testing and fixes by Jan de Leeuw, Jeff Horner and particularly Simon Urbanked, things are said to be better now with the new release 0.1.1 which went onto CRAN yesterday. So no new features,...

Read more »

WordPress Blogging with R in 3 Steps

September 29, 2009
By
WordPress Blogging with R in 3 Steps

A few people have emailed me and enquired about the use of tools mentioned at the end of this post to make blogposts with embedded R-commands. Below is a small step-by-step walkthrough of how to accomplish this. Write your blog post in a simple text file, you can include formatting using asciidoc syntax. Let’s

Read more »

WordPress Blogging with R in 3 Steps

September 29, 2009
By
WordPress Blogging with R in 3 Steps

A few people have emailed me and enquired about the use of tools mentioned at the end of this post to make blogposts with embedded R-commands. Below is a small step-by-step walkthrough of how to accomplish this. Write your blog post in a simple tex...

Read more »

Survive R

September 29, 2009
By

New PDF slides version (presented at the Bay Area R Users Meetup October 13, 2009). We at Win-Vector LLC appear to like R a bit more than some of our, perhaps wiser, colleagues ( see: Choose your weapon: Matlab, R or something else? and R and data ). While we do like R (see: Exciting Related posts:

Read more »

Blogs on R | Statistics

September 28, 2009
By
Blogs on R | Statistics

What are the current blogs on R? What do they cover?What makes a good blog on R?Of course different readers look for different things, but for me a good blog on R:Provides a Gateway: The blog discovers and shares useful external material and expla...

Read more »

Adjusting Correlations for Reliability | Attenuation Formula

September 28, 2009
By
Adjusting Correlations for Reliability | Attenuation Formula

This post discusses ways of adjusting correlations for reliability.Classical Test Theory states that an Observed variable is True Score plus Error. The true score variable is latent. In psychology theoretical interest typically relates more to the late...

Read more »