Hacker News Religion Poll

July 5, 2010

(This article was first published on R-Chart, and kindly contributed to R-bloggers)

Hacker News user post polls from time to time – the following code constructs a bar chart based upon the responses to a recent poll on the stated religious affiliation of Hacker news users (parsed straight from the site).  The chart above is as of the date of this post – users may still be voting.


# Clean up the data

# Remove the word ‘points’
data=gsub(‘ points’,”,data)

# Put in a matrix format
m=as.data.frame(t(array(data, dim=c(2,14))))


# Plot
par(las=2, mar=c(14, 4, 4, 2) + 0.1, cex=0.85)
title(‘Hacker News Religion Poll’)

To leave a comment for the author, please follow the link and comment on their blog: R-Chart.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...


Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)