397 search results for "knitr"

24 Days of R: Day 11

December 11, 2013
By
24 Days of R: Day 11

I don't know how often Michael Caine appeared in a Shakespearean work, but I'm sure that he has and I'm sure that he was excellent. A bit pressed for time today, so just a simple word cloud featuring the full text of King Lear. I found the text at a website that I presume is

Read more »

24 Days of R: Day 10

December 10, 2013
By
24 Days of R: Day 10

How often is someone nominated for an academy award? Who has been nominated most often? Is there a difference between leading and supporting roles? Important questions. To answer them, I'm making use of a list of academy award nominees and winners. I've obtained the data from aggdata.com which has a few sets of free data.

Read more »

Creating custom CDF for Affy chips in R / Bioconductor

Creating custom CDF for Affy chips in R / BioconductorWhat?For those who don't know, CDF files are chip definition format files that define which probes belong to which probesets, and are necessary to use any of the standard summarization methods such as RMA, and others.Why?Because we can, and because custom definitions have been shown to be quite useful. See...

Read more »

Writing papers using R Markdown

Writing papers using R Markdown

Writing papers using R MarkdownI have been watching the activity in RStudio and knitr for a while, and have even been using Rmd (R markdown) files in my own work as a way to easily provide commentary on an actual dataset analysis. Yihui has proposed writing papers in markdown and posting them to a blog as a way...

Read more »

24 Days of R: Day 9

December 9, 2013
By
24 Days of R: Day 9

This will be the third time I've tried to write this post. I had started out presuming that I would uncover something fascinating about applying Bayesian inference to a low-frequency claims generation process. That isn't at all what I got and I ought to have known better when I started. I started by doing very

Read more »

Hive Plots using R and Cytoscape

Hive Plots using R and Cytoscape

(This article was first published on Deciphering life: One bit at a time :: R, and kindly contributed to R-bloggers) I found out about HivePlots this past summer, and although I thought they looked incredibly useful and awesome, I didn't have a personal use for them at the time, and therefore put off doing anything with them. That recently...

Read more »

Tim Hortons Density

Tim Hortons Density

Tim Hortons DensityInspired by this post, I wanted to examine the locations and density of Tim Hortons restaurants in Canada. Using Stats Canada data, each census tract is queried on Foursquare for Tims locations.Setupoptions(stringsAsFactors = F) require(timmysDensity) require(plyr) require(maps) require(ggplot2) require(geosphere)Statistics Canada Census DataThe actual Statistics Canada data at the dissemination block level can be downloaded from here. You will want to...

Read more »

24 Days of R: Day 8

December 7, 2013
By
24 Days of R: Day 8

I saved the data from the last post which shows the percentage of Republican voters in each county. In addition to that column, I also have figures from the 2010 census. This will show things like age, ethnicity, urbanization and home ownership. Those census figures show actual population counts, so they'll need to be altered

Read more »

24 Days of R: Day 7

December 7, 2013
By
24 Days of R: Day 7

Carrying on from the last post, I'm going to take a closer look at election results for the 2012 US presidential election in North Carolina. This state's 15 electoral votes went to the Republican, Mitt Romney. On the US electoral college map, that means the state shows up as red. As I write this, I'm

Read more »

24 Days of R: Day 6

December 6, 2013
By
24 Days of R: Day 6

I've finally had some success at munging some HTML. For quite some time, I've wanted to render a county level choropleth for US presidential election results. The numbers are all there on Politico.com, but attempts to use readHTMLTable never returned the full set of data. It still doesn't, but I have sorted out how to

Read more »