how to use a function and read the help files in r

February 27, 2012
By

(This article was first published on twotorials by anthony damico, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: twotorials by anthony damico. R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL,...

Read more »

PCA for NIR Spectra_part 005: "Reconstruction"

February 27, 2012
By
PCA for NIR Spectra_part 005: "Reconstruction"

We saw how to plot the raw spectra (X), how to calculate the mean spectrum, how to center the sprectra (subtracting the mean spectrum from every spectra of the original matrix X). After that we have developed the PCAs with the NIPALS algorithm, getting...

Read more »

R integrated throughout the enterprise analytics stack

February 27, 2012
By

The past couple of years have seen a dramatic growth in the use of the R language in the enterprise. R has always been pervasive in academia for research and teaching in statistics and data science, and as new graduates trained in R have migrated to the workplace the demand for R in corporations has become more and more...

Read more »

RHadoop updated: improved performance and more control

February 27, 2012
By

Revolution Analytics' open-source RHadoop project, which provides integration between R and Hadoop, has been updated with the release of version 1.2 of the "rmr" package. New in this version: support for binary I/O formats, which improves on the text-only interfact by allowing use of faster and more space-efficient data formats like R's native serialization format. This version also improves...

Read more »

Revolution Analytics at Strata 2012

February 27, 2012
By

One of my favourite conferences, Strata: Making Data Work, starts tomorrow in Santa Clara, CA. Revolution Analytics is a proud sponsor, and I'll be there with the team to listen to some great talks and to meet other R users at our booth in the exhibition hall. There will be several R-related talks and tutorials during the conference, including...

Read more »

Subsetting made easy

February 27, 2012
By

Calculating characteristics such as median, mean,… of a subset of data is quite straightforward in R: For a data set containing results from several “models”, a subset for the model “base” is created by Then, the median of the variable … Continue reading →

Read more »

Testing the Effect of a Factor within each Level of another Factor with R-Package {contrast}

February 27, 2012
By
Testing the Effect of a Factor within each Level of another Factor with R-Package {contrast}

This is a small example of how custom contrasts can easily be applied with the contrast-package. The package-manual has several useful explanations and the below example was actually grabbed from there.This example can also be applied to a GLM but I ch...

Read more »

Realized efficient frontiers

February 27, 2012
By
Realized efficient frontiers

A look at the distortion from predicted to realized. The idea The efficient frontier is a mainstay of academic quant.  I’ve made fun of it before.  This post explores the efficient frontier in a slightly less snarky fashion. Data The universe is 474 stocks in the S&P 500.  The predictions are made using data from … Continue reading...

Read more »

Show me the data! Or how to digitize plots

February 27, 2012
By
Show me the data! Or how to digitize plots

I had mentioned the Guardian's data blog and the need for more data journalism earlier here. What I really like about the Guardian's approach in particular is that they share the data of their articles and encourage readers to use it.Of course there ar...

Read more »

The R-Podcast Episode 2: Getting Ready to Use R

February 26, 2012
By

In this episode: A couple of site updates, our first listener feedback, an overview of installing R on each major platform, and an overview of R IDEs and helpful resources for getting started with R. If you would like to provide feedback, please send an email or audio comment to [email protected] or leave us a

Read more »

Portfolio Optimization – Why do we need a Risk Model

February 26, 2012
By
Portfolio Optimization – Why do we need a Risk Model

In the last post, Multiple Factor Model – Building Risk Model, I have shown how to build a multiple factor risk model. In this post I want to explain why do we need a risk model and how it is used during portfolio construction process. The covariance matrix is used during the mean-variance portfolio optimization

Read more »

PCA for NIR Spectra_part 004: "Projections"

February 26, 2012
By
PCA for NIR Spectra_part 004: "Projections"

This plot in 2D, help us to decide the number of PCs, it is easy to create in R, once we have discompose the X matrix into a P matrix (loadings) and a T matrix (scores).For this plot, we just need the T matrix.> CPs<-seq(1,10,by=1)>  matp...

Read more »

Music player in R (Linux)

February 26, 2012
By

Yesterday I found out about ‘mplayer’, which is a movie/music player for Unix that can be completely controlled from the terminal (http://www.mplayerhq.hu/). I started playing around with it while at the same time learning reference classes. The result, a music … Continue reading →

Read more »

Sensual marimba sunspots

February 25, 2012
By

Here's the numbers of yearly sunspots, 1700-1988, brought to you by the nimble marimba of R: See ?sunspot.year in R for more information about the data. I did this last spring and just discovered it again. I've been so caught up in the current sound world of playitbyr (see this post for an example) that

Read more »

R twitteR Analysis: How HOT is the Lynas Rare Earths Mining Malaysia?

February 25, 2012
By
R twitteR Analysis: How HOT is the Lynas Rare Earths Mining Malaysia?

Since Lynas Malaysia Corporation, Australia Rare Earth Refiner Granted Malaysia License, it is always a very hot topic. This can be proven through the daily tweets across recent 7 days. This chart was built by Tweets Keyword Trending Application @...

Read more »

The undiscovered country – a tutorial on plotting maps in R

February 25, 2012
By
The undiscovered country – a tutorial on plotting maps in R

The ability to handle maps and geospatial images is always a nice trick to have up your sleeve. Almost any sizeable report will contain a map – of a locality, of a country, or of the world. However, very few analysts have the ability to produce these plots for themselves and often resort to using...

Read more »

R and Salesforce

February 25, 2012
By
R and Salesforce

Introduction R is widely used among scientists and statisticians to perform statistical analysis while Salesforce.com is one of the leading CRM software packages used for Marketing and Salesforce automation. Salesforce.com contains vital information regarding Leads, Customers, Contacts, Opportunities and Cases. Currently this data is mainly used for operational purposes by Sales and Marketing professionals. How

Read more »

A Roma

February 25, 2012
By
A Roma

Today, I am going to Rome for a week, teaching my PhD course on ABC I first gave in Paris. The course takes place in La Sapienza Università di Roma, from Monday till Thursday. There will be an R lab in addition to the lectures. (I have no further item of information at the moment.)

Read more »

PCA for NIR Spectra_part 003: "NIPALS"

February 25, 2012
By
PCA for NIR Spectra_part 003: "NIPALS"

> X<-yarn$NIR> X_nipals<-nipals(X,a=10,it=100)Two matrices are generated (P and T)As in other posts, we are going to look to the loadings & scores, for firsts three principal components:> wavelengths<-seq(1,268,by=1)> matplot(w...

Read more »

Why I don’t like Dynamic Typing

February 25, 2012
By

A lot of people consider the static typing found in languages such as C, C++, ML, Java and Scala as needless hairshirtism. They consider the dynamic typing of languages like Lisp, Scheme, Perl, Ruby and Python as a critical advantage (ignoring other features of these languages and other efforts at generic programming such as the Related posts:

Read more »

Creating beautiful maps with R

February 24, 2012
By
Creating beautiful maps with R

Spanish R user and solar energy lecturer Oscar Perpiñán Lamigueiro has written a detailed three-part guide to creating beautiful maps and choropleths (maps color-coded with regional data) using the R language. Motivated by the desire to recreate this graphic from the New York Times, Oscar describes how he creates similar high-quality maps using R. In Part 1, Oscar grabbed...

Read more »

I’m Hiring!

February 24, 2012
By

I direct the Bioinformatics Core at the University of Virginia, and I'm hiring. Visit this link on the UVA Jobs website for more information. Here's the description:The University of Virginia Bioinformatics Core is seeking a full-time position as a bio...

Read more »

How to save high frequency data in mongodb

February 24, 2012
By

Are you looking for ways how to save real time, high frequency data taken from Interactivebrokers.com API ? I built an example in C++ which saves all incoming data in Mongodb. Check this link if you are interested: https://github.com/kafka399/TwsMongo  

Read more »

Synchronous vs. asynchronous agent activation example

February 24, 2012
By
Synchronous vs. asynchronous agent activation example

This time I have implemented NetLogo Voting model to verify how agent activation scheme influences the results.The code executing the simulation is given below. It simulates two types of voter preferences encoded as 1 and -1. In this way...

Read more »

Analyzing weblog data with R

February 23, 2012
By
Analyzing weblog data with R

The R-chart blog explains how to read a weblog file into R, so you can analyze traffic to a website. For example, here's a page request chart created with R: Now, charts like this are stock-in-trade for tools like Google Analytics, but this is still useful if you want to look at the performance of a site that hasn't...

Read more »

GSoC Project #2 for 2012

February 23, 2012
By
GSoC Project #2 for 2012

In my prior post, I discussed the origins of the first GSoC project I posted this year. The second GSoC project I’ve proposed is around the writing and code of Attilio Meucci, an adjunct professor at Baruch College – CUNY and an excellent speaker (I saw him at the University of Chicago when he spoke

Read more »

Large-scale Inference

February 23, 2012
By
Large-scale Inference

Large-scale Inference by Brad Efron is the first IMS Monograph in this new series, coordinated by David Cox and published by Cambridge University Press. Since I read this book immediately after Cox’ and Donnelly’s Principles of Applied Statistics, I was thinking of drawing a parallel between the two books. However, while none of them can

Read more »

Pocketbook costs of software

February 23, 2012
By
Pocketbook costs of software

I have always been provided SAS as part of my job, so I never really realized how much it cost. I’ve bought Stata before, and of course R . I recently found out how much a reasonable bundle of SAS modules along with base SAS costs per year per seat, at least under the GSA.

Read more »

Ternary ifelse ( ?: ) in different languages

February 23, 2012
By

AWK$ awk 'ORS=NR%3?",":"\n"' student-marksPerl /PHP$result = ($a > $b) ? $x : $y;In Per6, use double ? and ! instead.$result = ($a > $b) ?? $x !! $y;Rifelse(a>0,a,0)Ternary operator (if?true:false)bash/linuxternary operator ? : is ju...

Read more »