Machine Learning in R

September 10, 2009
By

Revolutions blog recently posted a link to R code by Joshua Reich with self-contained examples of using machine learning techniques in R, including various clustering methods (k-means, nearest neighbor, and kernel), recursive partitioning (CART), principle components analysis, linear discriminant analysis, and support vector machines.  This post also links to some slides that go over the basics

Read more »

brew: Creating Repetitive Reports

September 9, 2009
By
brew: Creating Repetitive Reports

United Nations report World Population Prospects: The 2008 Revision (highlights available here) provides data about the historical and forecasted population of the country. In exploring the future and past population trends it is relatively easy to subset the dataset by your selected variable. > file <- c("UNdata_Population.csv") > population <- read.csv(file) > names(population) <- c("code", "country", "year", +

Read more »

search the graph gallery from R

September 8, 2009
By

pre{ font-size:xx-small !important ; border: 1px black solid; } This is a short code snippet that is motivated by this thread on r-help yesterday. The gallery contains a search engine textbox (top-right) that can be used to search for content i...

Read more »

new R package : ant

September 8, 2009
By

The ant package has been released to CRAN yesterday. As discussed in previous posts in this blog (here and here), the ant R package provides an R-aware version of the ant build tool from the apache project. The package contains an R script that c...

Read more »

Comparison between 15 different cities…

September 6, 2009
By
Comparison between 15 different cities…

The other day I was thinking about how expensive will it be to live in London (as I'm going to live in London for almost one year), and also thinking about how expensive are the cities where some of my best friends live and I got a report by UBS called "Prices and Earnings 2009", it's all...

Read more »

Comparison between 15 different cities…

September 6, 2009
By
Comparison between 15 different cities…

The other day I was thinking about how expensive will it be to live in London (as I'm going to live in London for almost one year), and also thinking about how expensive are the cities where some of my best friends live and I got a report by UBS called "Prices and Earnings 2009", it's all...

Read more »

Global Mean Sea Level Trends

September 6, 2009
By
Global Mean Sea Level Trends

In this post, I show an R script that downloads the University  of Colorado, Boulder’s 1993-2009 global mean sea level (msl) change (link) data, converts the ASCII file into a usable R data frame, calculates moving average and msl change  trend rate and develops a trend  chart that shows msl change  and trend rates

Read more »

RQuantLib 0.3.0 Windows build snag

September 6, 2009
By

Yesterday's upload of RQuantLib 0.3.0 contained one minor oversight: I had failed to update src/Makefile.win to the new and enlarged set of source files. The proper fix (of using wildcards and implicit rules) was simple, and Uwe Ligges kindly rebuilt...

Read more »

RQuantLib 0.3.0 Windows build snag

September 6, 2009
By

Yesterday's upload of RQuantLib 0.3.0 contained one minor oversight: I had failed to update src/Makefile.win to the new and enlarged set of source files. The proper fix (of using wildcards and implicit rules) was simple, and Uwe Ligges kindly rebuilt R...

Read more »

RQuantLib 0.3.0 Windows build snag

September 6, 2009
By

Yesterday's upload of RQuantLib 0.3.0 contained one minor oversight: I had failed to update src/Makefile.win to the new and enlarged set of source files. The proper fix (of using wildcards and implicit rules) was simple, and Uwe Ligges kindly rebuilt...

Read more »

RQuantLib 0.3.0 released

September 5, 2009
By

Earlier this evening, I rolled up a new version of RQuantLib. It has been pushed to CRAN and Debian, and source and binary version should appear on the respective mirror networks in due course. This version, the first in a new '0.3.*' release seri...

Read more »

RQuantLib 0.3.0 released

September 5, 2009
By

Earlier this evening, I rolled up a new version of RQuantLib. It has been pushed to CRAN and Debian, and source and binary version should appear on the respective mirror networks in due course. This version, the first in a new '0.3.*' release series, ...

Read more »

RQuantLib 0.3.0 released

September 5, 2009
By

Earlier this evening, I rolled up a new version of RQuantLib. It has been pushed to CRAN and Debian, and source and binary version should appear on the respective mirror networks in due course. This version, the first in a new '0.3.*' release seri...

Read more »

Polynomial regression techniques

September 5, 2009
By
Polynomial regression techniques

Suppose we want to create a polynomial that can approximate better the following dataset on the population of a certain Italian city over 10 years. The table summarizes the data:$$\begin{tabular}{|1|1|}\hline Year & Population\\ \hline 1959&4835\\ 1960&4970\\ 1961&5085\\ 1962&5160\\ 1963&5310\\ 1964&5260\\ 1965&5235\\ 1966&5255\\ 1967&5235\\ 1968&5210\\ 1969&5175\\ \hline \end{tabular}$$First we import the data into R:Year Population Now we create the dataframe...

Read more »

Polynomial regression techniques

September 5, 2009
By
Polynomial regression techniques

Suppose we want to create a polynomial that can approximate better the following dataset on the population of a certain Italian city over 10 years. The table summarizes the data:$$\begin{tabular}{|1|1|}\hline Year & Population\\ \hline 1959&4835\\ 1960&4970\\ 1961&5085\\ 1962&5160\\ 1963&5310\\ 1964&5260\\ 1965&5235\\ 1966&5255\\ 1967&5235\\ 1968&5210\\ 1969&5175\\ \hline \end{tabular}$$First we import the data into R:Year Population Now we create the dataframe...

Read more »

R Flashmob

September 4, 2009
By

Today I noticed a call for R users to gather around a single campfire for one hour and share their questions and answers. The campfire name is stackoverflow.com, a site dedicated for handling programming questions. The event details are bellow: From: The R Flashmob Project Subject: R Flashmob #2 You are invited to take part in R Flashmob, the

Read more »

R Flashmob

September 4, 2009
By
R Flashmob

Today I noticed a call for R users to gather around a single campfire for one hour and share their questions and answers. The campfire name is stackoverflow.com, a site dedicated for handling programming questions. The event details are bellow: From: ...

Read more »

ClipPath copies filename and path from windows for loading into R

September 4, 2009
By

I wish I would have discovered this long ago.  Loading data into R or MySQL requires you to specify the full path to the file.  If you do this on a Windows machine there are two annoyances.  First, if you save something to your desktop the path to your desktop is really long.  Second, windows by default uses backslashes...

Read more »

Global Sea Surface Temperature Trends (1850-2009)

September 4, 2009
By
Global Sea Surface Temperature Trends (1850-2009)

In this post, I show an R script that downloads the Hadley Centre’s 1850-2009 monthly sea surface temperature (HadSST2) anomaly data, converts the ASCII file into 2 usable R data frames, calculates overall and post 1980 SST anomaly trend rates and develops a 2 panel chart that shows SST anomalies and trend rates and the

Read more »

R Flashmob #2

September 4, 2009
By
R Flashmob #2

As I said before, I consider the R-Help mailing list an invaluable source of information if you want to get things done in R. Recently the stackoverflow website, a site where programmers can post and answer questions about a wide list of programming la...

Read more »

Compiling and Cross-compiling R packages for Windows (win32)

September 3, 2009
By

so recently i’m learning how to compile and cross-compile R packages from source for windows machines, which means i have to create windows binaries. the first option is to build on a windows system, and the 2nd is to cross-build on an intel-based linux or mac system. i will outline my experience. Send it off

Read more »

Let’s All Go Down to the Barplot!

September 3, 2009
By
Let’s All Go Down to the Barplot!

I’m back for another pean to ANOVA-loving experimental ecology. Barplots (or point-range plots – but which is better is a discussion for a different time) are the thing! And a friend of mine was recently asking me how to do a decent barplot with ggplot2 for data of moderate complexity (e.g., a 2-way ANOVA). So

Read more »

Truncated Normal Distribution

September 3, 2009
By

Many distributions may be used to describe patterns that are non-negative; however, there are not as many choices when an upper bound is also needed (although the beta distribution is very flexible). For various reasons, truncated distributions are som...

Read more »

Truncated Normal Distribution

September 3, 2009
By

Many distributions may be used to describe patterns that are non-negative; however, there are not as many choices when an upper bound is also needed (although the beta distribution is very flexible). For various reasons, truncated distributions are som...

Read more »

update on the ant package

September 3, 2009
By

I have updated the ant package I described yesterday in this blog to add several things Now the R code related to <r-set> and <r-run> tasks can either be given as the code attribute or as the text inside the task The R code has acces...

Read more »

Learning ggplot2: 2D plot with histograms for each dimension

September 3, 2009
By
Learning ggplot2: 2D plot with histograms for each dimension

Update (April 2013): The code below doesn't work anymore with new ggplot2 versions, here is an updated version.I have two 2D distributions and want to show on a 2D plot how they are related, but I also want to show the histograms (actually, density plots in this case) for each dimension. Thanks to ggplot2 and a

Read more »

Learning ggplot2: 2D plot with histograms for each dimension

September 3, 2009
By
Learning ggplot2: 2D plot with histograms for each dimension

I have two 2D distributions and want to show on a 2D plot how they are related, but I also want to show the histograms (actually, density plots in this case) for each dimension. Thanks to ggplot2 and a Learning R post, I have sort of managed to do what I want to have:

Read more »

Fitting lactation curves/functions in R

September 3, 2009
By

It is quite some time ago since I wrote a set of lactation curves/functions in R. I put those functions in the animSci package. However, the package is in a mess for quite some time now - I was adding some new functions, but did not have time to finish the job properly. This is also the reason...

Read more »

Fitting lactation curves/functions in R

September 3, 2009
By

It is quite some time ago since I wrote a set of lactation curves/functions in R. I put those functions in the animSci package. However, the package is in a mess for quite some time now - I was adding some new functions, but did not have time to finish the job properly. This is also the reason...

Read more »