Blog Archives

21 R navigation tools

August 17, 2014
By
21 R navigation tools

Navigation gets you from where you are to where you want to be. Speaking of navigation, you can jump to selected sections of this post: Navigation; R-bloggers; Task views; Rdocumentation.org; sos package; ??; apropos; ls; methods; getAnywhere; :::; find; args; grep; %in%; str; getwd; file.choose; Spyglass summary; browser; See also. Overview Figure 1: A map The post

Read more »

The TaoTeProgramming R package

June 29, 2014
By
The TaoTeProgramming R package

I’d like to do a song of great social and political import. The code that created the illustrations in Tao Te Programming is now available as the TaoTeProgramming package on CRAN. The sea is just flat hills And they are both just smooth mountains. The package contains just over 1000 lines of code.  More than The post

Read more »

An xts R Inferno-ism

February 7, 2014
By

Another of the all ye entering here. Issue When subscripting an xts object, columns that don’t exist in the object are silently ignored. Example First, create an xts object: xtx <- xts(cbind(a=1:4, b=11:14, c=21:24), order=Sys.Date() + 1:4) which looks like: > xtx a b c 2014-02-07 1 11 21 2014-02-08 2 12 22 2014-02-09 3 The post

Read more »

From spreadsheet thinking to R thinking

January 7, 2014
By
From spreadsheet thinking to R thinking

Towards the basic R mindset. Previously The post “A first step towards R from spreadsheets” provides an introduction to switching from spreadsheets to R.  It also includes a list of additional posts (like this one) on the transition. Add two columns Figure 1 shows some numbers in two columns and the start of adding those The post From...

Read more »

Blog recap of 2013

December 31, 2013
By

Posts by page views Interview with a forced convert to R from Matlab A first step towards R from spreadsheets Plot ranges of data in R A statistical review of ‘Thinking, Fast and Slow’ by Daniel Kahneman The 3 dots construct in R Translating between R and SQL: the basics An R debugging example R The post Blog...

Read more »

A statistical review of ‘Thinking, Fast and Slow’ by Daniel Kahneman

November 11, 2013
By
A statistical review of ‘Thinking, Fast and Slow’ by Daniel Kahneman

I failed to find Kahneman’s book in the economics section of the bookshop, so I had to ask where it was.  ”Oh, that’s in the psychology section.”  It should have also been in the statistics section. He states that his collaboration with Amos Tversky started with the question: Are humans good intuitive statisticians? The wrong The post A...

Read more »

Translating between R and SQL: the basics

November 8, 2013
By

An introductory comparison of using the two languages. Background R was made especially for data analysis and graphics.  SQL was made especially for databases.  They are allies. The data structure in R that most closely matches a SQL table is a data frame.  The terms rows and columns are used in both. A mashup There The post Translating...

Read more »

The joy of data analysis

October 24, 2013
By
The joy of data analysis

Music and snow. Poke my eyes out Perhaps your immediate response is: “I’d rather poke my eyes out with a burning stick than do data analysis.” There’s a completely different reaction from a lot of people who have experienced data analysis. Music It’s not entirely clear why humans like music so much. Part of it The post The...

Read more »

A first step towards R from spreadsheets

October 16, 2013
By
A first step towards R from spreadsheets

Move your data analysis to a computing environment specifically designed for it. Why R and not spreadsheets? Here are three reasons: complexity graphics money Spreadsheets are easily overwhelmed.  Very complex things can be done in spreadsheets — it is just that complex spreadsheets are inefficient and dangerous. Graphics should be considered vital when doing anything with The post A...

Read more »

An R debugging example

May 21, 2013
By

The steps taken to fix an R problem. Task To prepare for the Portfolio Probe blog post called “Implied alpha and minimum variance”, I tried to update a matrix of daily stock prices using a function I had written for the purpose. Error When I tried to do what I wanted, I got: > univclose130518 The post An...

Read more »