Blog Archives

nice ggplot intro tutorial. Just run the commands, about 6 pages…

November 22, 2012
By

nice ggplot intro tutorial. Just run the commands, about 6 pages = flexible 1-3 hours of learning, depending how much reading you want to pair it with by Ramon Saccilotto

Read more »

What’s the difference between POSIXct and POSIXlt?

November 21, 2012
By

POSIXct is the signed number of seconds since “the epoch”. For example it was 1351298112 UTC (GMT) when I wrote this. (1351298112 UTC = Sat Oct 27, 2:35 am GMT = Fri Oct 26, 8:35 pm EST = Fri Oct 26, 5:35 pm PST = 2:35 pm HST) POSIXlt is one of many text | character | string formats such as: May 17, 2017 17/5/2017 17-5-17 05:24:39

Read more »

I’ve peeped a number of object-oriented R tutorials. This…

October 4, 2012
By

I’ve peeped a number of object-oriented R tutorials. This is the first one I could make it through. Easy and pleasant to read.

Read more »

Economic geography of the eastern USA circa 1999, median incomes…

August 25, 2012
By
Economic geography of the eastern USA
circa 1999, median incomes…

Economic geography of the eastern USA circa 1999, median incomes by zip code Code and data source to follow in a longer post.

Read more »

Why trust some supposed laws of statistical sampling and…

August 15, 2012
By

Why trust some supposed laws of statistical sampling and convergence when you can just test them yourself? If you have a computer with R installed (also recommended: Rstudio) then you can stop dithering about whether these n=1000 studies cited in the n...

Read more »

Outer Product of Character Vectors in R

July 19, 2012
By
Outer Product of Character Vectors in R

What follows is like a kata to strengthen your R fundamentals. The lovely stats in the wild recently posted some hott data analysis of Olympians’ ages and sexes. Because I’m annoyingly picky about graphics, I asked for his code so I could ...

Read more »

multiplicitiesoffreedom demonstrates Chaos Theory in Excel. If…

June 29, 2012
By
multiplicitiesoffreedom demonstrates Chaos Theory in Excel. If…

multiplicitiesoffreedom demonstrates Chaos Theory in Excel. If he filled in more initial values, you would see a thick bar—like a picture of white-noise. Butterflies flapping their wings in Vermont to change the wind in Hangzhou? A drop of water on ...

Read more »

How do I Create the Identity Matrix in R?

June 27, 2012
By
How do I Create the Identity Matrix in R?

I googled for this once upon a time and nothing came up. Hopefully this saves someone ten minutes of digging about in the documentation. You make identity matrices with the keyword diag, and the number of dimensions in parentheses. > diag(3) [,...

Read more »

An unabashedly narcissistic data analysis of my own tweets. The…

April 2, 2012
By
An unabashedly narcissistic data analysis of my own tweets.
The…

pie( table( whence.i.tweet )) qplot( whence ) + coord_polar() pie( log( table( whence )))+RColorBrewer ggplot (see below) plot( density( tweets.len )) qplot(... stat="density") + geom_density qplot(...stat="bin") + geom_text(...) tweeple tweep...

Read more »

Bare-bones intro to Plotting options in R

March 21, 2012
By
Bare-bones intro to Plotting options in R

If you’re using base::plot in R for the first time (for example if you do plot(pima) or plot(faithful) (use ??pima if you can’t find the dataset)) you may have looked at ?plot (2 page help file) or ?par (12 page help file) to figure out what’s go...

Read more »