Monthly Archives: October 2009

What ‘The power of R’ is saying

October 7, 2009
By
What ‘The power of R’ is saying

Hey again,I was looking for random things at google and I found such an interesting site: www.wordle.net, were you can put lots of words or the url of a blog (like this for example) and you get a cloud with the words you put and you can change colors a...

Read more »

Factor Analysis in R

October 7, 2009
By
Factor Analysis in R

This post shows an example of running a basic factor analysis in R.Additional Resources:Quick-Rpsych packageJame's Steiger's exampleFactoMineR packageThe Example:The example is based on responses by 117 university students to a 50 item version of the I...

Read more »

Efficient Variable Selection in R

October 7, 2009
By
Efficient Variable Selection in R

This post sets out my procedure for efficiently and reliably selecting variables from a data.frame in RTHE PROBLEMFor years I have been tormented by the hassle of selecting variables in a data.frame. I often work with psychological datasets with hundre...

Read more »

R Commander: A Basic Statistics GUI for R

October 6, 2009
By

R is a great tool with lots of resources for genetics, genome-wide association studies, and many other biological applications.  We've covered several places to find help in R in the past, but if you're still apprehensive about diving into R's command-line interface, fear not.  The R commander is a graphical user interface (GUI) for R that works under Windows,...

Read more »

Export Data Frames To Multi-worksheet Excel File

October 6, 2009
By
Export Data Frames To Multi-worksheet Excel File

A few weeks ago I needed to export a number of data frames to separate worksheets in an Excel file. Although one could output csv-files from R and then import them manually or with the help of VBA into Excel, I was after a more streamlined solution, as I would need to repeat this process

Read more »

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 »