Posts Tagged ‘ R code ’

R Code Example for Neural Networks

December 12, 2010
By
R Code Example for Neural Networks

See also NEURAL NETWORKS. In this past June's issue of R journal, the 'neuralnet' package was introduced. I had recently been familiar with utilizing neural networks via the 'nnet' package (see my post on Data Mining in A Nutshell) but I find the neuralnet package more useful because it will allow you to actually plot...

Read more »

Le Monde puzzle [34]

October 3, 2010
By
Le Monde puzzle [34]

Since the puzzle in this week (-end) edition of Le Monde is not (easily) solvable via an R program, I chose to go back to an older puzzle that my students can solve. Eleven token are distributed around a 200 meter perimeter-long ring. They all start moving at the same speed, 18km/h, in

Read more »

Data Mining in A Nutshell

September 20, 2010
By
Data Mining in A Nutshell

# The following code may look rough, but simply paste into R or# a text editor (especially Notepad++) and it will look# much better.# PROGRAM NAME: MACHINE_LEARNING_R# DATE: 4/19/2010# AUTHOR : MATT BOGARD# PURPOSE: BASIC EXAMPLES OF MACHINE LEAR...

Read more »

R Code Examples

September 19, 2010
By
R Code Examples

Data Mining in a Nutshell 'neuralnet'  neural network estimation and visualizationVisualizing Agricultural Subsidies by KY County R Code For googleVis  Data Visualization

Read more »

Taking R to the Limit: Large Datasets; Predictive modeling with PMML and ADAPA

August 30, 2010
By
Taking R to the Limit: Large Datasets; Predictive modeling with PMML and ADAPA

During the first part of our meeting, Ryan Rosario presented on the topic of large datasets in R. Video, slides and code of the talk “Taking R to the Limit: Large Datasets” by Ryan Rosario at the Los Angeles area … Continue reading →

Read more »

Taking R to the Limit: Parallelization

July 29, 2010
By
Taking R to the Limit: Parallelization

Video, slides and code of the talk “Taking R to the Limit: Parallelization” by Ryan Rosario at the Los Angeles area R Users Group in July 2010 as follows. Slides: R code: here. Video: If you have a question to … Continue reading →

Read more »

Clustergram: visualization and diagnostics for cluster analysis (R code)

June 15, 2010
By
Clustergram: visualization and diagnostics for cluster analysis (R code)

About Clustergrams In 2002, Matthias Schonlau published in “The Stata Journal” an article named “The Clustergram: A graph for visualizing hierarchical and . As explained in the abstract: In hierarchical cluster analysis dendrogram graphs are used to visualize how clusters are formed. I propose an alternative graph named “clustergram” to examine how cluster members are assigned to clusters as...

Read more »

How to upgrade R on windows – another strategy (and the R code to do it)

April 23, 2010
By
How to upgrade R on windows – another strategy (and the R code to do it)

Update: In the end of the post I added simple step by step instruction on how to move to the new system. I STRONGLY suggest using the code only after you read the entire post. Background If you didn’t hear it by now – R 2.11.0 is out with a bunch of new features. After Andrew Gelman recently lamented the lack...

Read more »

formatR: farewell to ugly R code

April 13, 2010
By
formatR: farewell to ugly R code

It is not uncommon to see messy R code which is almost not human-readable like this: # rotation of the word "Animation" # in a loop; change the angle and color # step by step for (i in 1:360) { # redraw the plot again and again plot(1,ann=FALSE,type="n",axes=FALSE) # rotate; use rainbow() colors text(1,1,"Animation",srt=i,col=rainbow(360),cex=7*i/360) #

Read more »

Correlation scatter-plot matrix for ordered-categorical data

April 7, 2010
By
Correlation scatter-plot matrix for ordered-categorical data

When analyzing a questionnaire, one often wants to view the correlation between two or more Likert questionnaire item’s (for example: two ordered categorical vectors ranging from 1 to 5). When dealing with several such Likert variable’s, a clear presentation of all the pairwise relation’s between our variable can be achieved by inspecting the (Spearman) correlation matrix (easily achieved in R...

Read more »