Publications by C
Free Online Statistics Books
Sources as varied as Google’s Chief Economist Hal Varian and threatening online personalty (offensive language warning) Zed Shaw have recognized a growing need for professionals with solid statistical skills to meet the technical challenges facing the world today. There are a number of great online resources available for learning and reviewi...
928 sym 2 img 1 tbl
The 1000 most-visited sites analyzed using R
Ever wondered about which Computer and Electronics web sites get the most Page Views? Based upon data recently published by Google:The R program to create this graph is as follows:library(XML)# URL for the Google Datau=”http://www.google.com/adplanner/static/top1000/”tables = readHTMLTable(u)l=tables[[2]]# Name the columnscolnames(l)=c(‘Ra...
3616 sym 6 img
Ruby Script to parse ISBNs listed in R-Project to populate an Amazon
As you probably figured out, I am an Amazon affiliate and have been giving some thought to how to get the best lists of R books available at Amazon. To get the list of ISBNs from R-Project, the following Ruby script did the trick:require ‘rubygems’require ‘open-uri’require ‘hpricot’isbns=[]doc=Hpricot(open(‘https://www.r-project.or...
1137 sym 4 img
Plotting World Bank Data with R
Copy and paste the code listed in this post below, and you can create a plot of World Bank data using R with a call like the following:plotWorldBank(‘USA’,’NY.GDP.MKTP.KD.ZG’)There is a wealth of economic and demographic available at the World Bank. They are also interested in developers using their data to produce applications. You c...
2762 sym 4 img
3 lines of R code to Process a Web Service
Ruby is well known for its terse syntax and ability to process web services. I prefer JSON (Javascript Object Notation) to XML whenever possible. For example, a script to retrieve a list of World Bank Data takes all of three lines of code (after installing the required packages):[‘rubygems’,’JSON’,’open-uri’].each{|r|require r}a=J...
2616 sym 4 img
Data Mining with WEKA example implemented in R
IBM Developer Works has several new articles on Data Mining with WEKA by Michael Abernethy. I decided to implement the example provided in the first article in the series using R. I realize that I could have used WEKA through R (using the RWeka package) to exactly emulate the process in the article, but I was interested in getting a better und...
2687 sym 2 img
Plotting BP Oil Spill Testing Data using R
The Deepwater Horizon Incident is in the U.S. headlines and on many peoples minds. The folks over at Revolution Analytics were even discussing this subject today. Several government sites including the NOAA have sections dedicated to the problem. In fact, the EPA is concerned enough that they are eliciting technical solutions right on the site...
2868 sym 6 img
Date and Time in R
The following are a few date and time functions that I needed to figure out early on when working with R.We will start when we are… the current system date.Sys.Date()Notice that this function returns a Date object.class(Date)A string in this format is treated as a character unless cast to a Date type.class(“2010-06-16”)class(as.Date(“2010...
2053 sym 4 img
Calling Ruby, Perl or Python from R
If you want to interact with other programming languages from R, there are various packages and bindings available. These packages provide a pretty high degree of integration between the langages and allow you to pass objects back and forth seemlessly. The downside is that you need to have the time, security rights and correct installation seq...
390 sym 4 img 1 tbl
Installing Ruby on Linux as a User other than root
Ruby is best known as the language behind the rails web application framework. However, it is a very flexible general purpose language that can be used for tasks of direct interest to R Developers (parsing files, interacting with databases, processing XML or JSON, math functions, statistics, machine learning, etc).If you do not have root access ...
2257 sym 4 img