R function to reverse and complement a DNA sequence

November 13, 2008
By
R function to reverse and complement a DNA sequence

Warning!! This post is intended for documentation only. I would like to remind everyone (me in first place!) that the comp() function of the (seqinr) package can complement a DNA sequence, and rev() function of Rbase can reverse a character vector. Using a combination of the two you can reverse, complement, and reverse complement sequences

Read more »

Modeling Financial Time Series with S-PLUS

November 12, 2008
By

Although S-plus is the most terrible language I have ever used in terms of debugging (I have to say that, no offense to S-plus fans, as my colleagues said, it is hard to understand it is still existed in 21 centuary), I found the S-plus scripts accomp...

Read more »

Saving a Workspace

November 11, 2008
By

R will can save the users workspace at the end of a session so that he can take it up again where he left off. I personally don't like doing this but there are times when one would want to save their work, especially after complex and time consuming co...

Read more »

Quantitative Risk Management R package

I shared an Econometric tools for performance and risk analysis package in R, today I introduce another Quantitative Risk Management R package, which is accompanying the book Quantitative Risk Management: Concepts, Techniques and Tools by Alexander J....

Read more »

Plotting Math in R

October 29, 2008
By

Plotting math in R can be acheived using the expression(). To know detailed usage, in R console,demo(plotmath)But expression() is not flexible when you want to plot math symbols and parameters altogether. In this case, we use bquote() which is actually a wraper for substitute() and quote(). It has the ability to do paste() and expression() altogether. Here...

Read more »

Plotting Math in R

October 29, 2008
By

Plotting math in R can be acheived using the expression(). To know detailed usage, in R console,demo(plotmath)But expression() is not flexible when you want to plot math symbols and parameters altogether. In this case, we use bquote() which is actually a wraper for substitute() and quote(). It has the ability to do paste() and expression() altogether. Here...

Read more »

The most popular programming languages in 2008

October 26, 2008
By

TIOBE has released the newest ranking for the most popular programming language here. Java remains the top popular programming language. C and C++ follow with Java. I dont' see R in this ranking. Maybe it doesn't belong to this group! Maybe I should ...

Read more »

The most popular programming languages in 2008

October 26, 2008
By

TIOBE has released the newest ranking for the most popular programming language here. Java remains the top popular programming language. C and C++ follow with Java. I dont' see R in this ranking. Maybe it doesn't belong to this group! Maybe I should ...

Read more »

Working with directories

October 24, 2008
By

Something quite annoying to me is when I get an R script and I have to change all of the file references in the script. I get something like this this: source("C:\\Documents and Settings\\UserName\\Data\\...\\File1.R") data<-read.table("C:\\Documen...

Read more »

Rmetrics – Basics of Option Valuation

Open Source Software for Financial Engineering and Computational FinanceRmetrics is the premier open source solution for teaching financial market analysis and valuation of financial instruments. With hundreds of functions build on modern methods Rmet...

Read more »

What I’ll be presenting at O’Reilly Money Tech 2009

October 21, 2008
By
What I’ll be presenting at O’Reilly Money Tech 2009

(April 2009 Update:  Unfortunately, The Money Tech Conference was indefinitely postponed, but fortunately I will be presenting a version of this talk in July at OSCON 2009). I’ve been invited to speak at O’Reilly’s Money Tech conference this coming February 4-6th in New York City and thought I’d share the abstract for my talk here.  I’ll

Read more »

Another solution to the R to Word table problem

October 17, 2008
By

Last time I used an HTML solution. This time, I create an RTF file:# function: my.rtf.table# purpose: convert a matrix, data.frame, or array into a rtf table# output: text for RTF, possibly written to a file# inputs:# tab - a table, dataframe, or array (needs rownames and colnames)# outfile - name of file (or console if NULL,...

Read more »

Using R in consulting: playing nice with Microsoft Word

October 17, 2008
By

As I use R more in consulting, I'm finding the need to make the quick transition from R to Microsoft products (usually Word) more serious. (I'm using a Windows platform, but I'm sure the challenges on the Mac would be similar.) I simply don't have time to do the text manipulations necessary to convert text to Word tables, for...

Read more »

Time series packages on R

October 16, 2008
By
Time series packages on R

There is now an official CRAN Task View for Time Series. This will replace my earlier list of time series packages for R, and provide a more visible and useful entry point for people wanting to use R for time series analysis. If I have missed anything on the list, please let me know.

Read more »

Time series packages on R

October 16, 2008
By

There is now an official CRAN Task View for Time Series. This will replace my earlier list of time series packages for R, and provide a more visible and useful entry point for people wanting to use R for time series analysis. If I have missed anything ...

Read more »

Econometric tools for performance and risk analysis

QuotationLibrary of econometric functions for performance and risk analysis of financial portfolios. This library aims to aid practitioners and researchers in using the latest research in analysis of both normal and non-normal return streams.We create...

Read more »

R’s working directory

October 3, 2008
By
R’s working directory

Do you usually start R with a desktop icon or some other shortcut? Are you tired of using setwd and getwd each time after you start R to get the working directory correctly? If so, then your days of suffering might be just coming to an end. Having the working directory set correctly is very

Read more »

Welcome to FOSS Trading

September 28, 2008
By
Welcome to FOSS Trading

This blog will highlight the development and use of free open-source software to research, test, and trade financial markets.Meet the authors:Joshua Ulrich is currently the author and maintainer of four R packages:TTR - Technical Trading Rules - a suit...

Read more »

Group-level variances and correlations

September 23, 2008
By

This is just a sum-up of what we should do when we try to estimate the group-level variances and correlations but the software failed to do so. As a R and lmer() user, I found this happens often.If this is the case, there are three potential problems...

Read more »

Group-level variances and correlations

September 23, 2008
By

This is just a sum-up of what we should do when we try to estimate the group-level variances and correlations but the software failed to do so. As a R and lmer() user, I found this happens often.If this is the case, there are three potential problems...

Read more »

Design Flaws in R #3 — Zero Subscripts

September 21, 2008
By
Design Flaws in R #3 — Zero Subscripts

Unlike the two design flaws I posted about before (here, here, and also here), where one could at least see a reason for the design decision, even if it was unwise, this design flaw is just  incomprehensible.  For no reason at all that I can see, R allows one to use zero as a subscript

Read more »

pmin and pmax

September 16, 2008
By

Did you know that there are multiple versions of the min and max function. make sure that you are using the right one. pmin and pmax are the 'parallel' versions of the min and max function, meaning that they can take vector arguments and return vectors back. Much better than setting up your own apply function....

Read more »

Highlights from useR!

September 11, 2008
By

By Pete Meyer, Ads Quality Statistics TeamGoogle was a sponsor of this year's international user conference in Dortmund, Germany for the R statistical programming environment. In addition to sessions focusing on statistical modeling in various areas of...

Read more »

Highlights from useR!

September 11, 2008
By

By Pete Meyer, Ads Quality Statistics TeamGoogle was a sponsor of this year's international user conference in Dortmund, Germany for the R statistical programming environment. In addition to sessions focusing on statistical modeling in various areas of...

Read more »

rgraph6 on R-Forge

September 4, 2008
By
rgraph6 on R-Forge

I have moved my rgraph6 R package to R-Forge. R-Forge is a website that facilitates development of R packages by providing services for version control (through Subversion), automatic checking and building of the packages including binaries for Windows and MacOS, as well as for collaboration with other R users/developers. The rgraph6 package has been already

Read more »

evolutionary algorithm optimization

September 4, 2008
By

In the post Optimization packages dozens of optimization routines can be downloaded, here I am going to share a special optimization method: evolutionary algorithm. Evolutionary algorithms (EAs) are search methods that take their inspiration from natu...

Read more »

How do you measure a major league slugger?

September 1, 2008
By
How do you measure a major league slugger?

I gave a talk last month at SAP Labs in Palo Alto, along with Jim Porzak of ResponSys, introducing the R Statistical Language to a Business Intelligence interest group.  The goal was to highlight how open source tools, like R, can be used to build predictive models.  The example I gave centered around baseball and

Read more »

UseR!2008 aftermath

August 30, 2008
By
UseR!2008 aftermath

Earlier in August I was on the R user conference which this year took place in Dortmund. It was a quite an exciting event gathering around 500 people from around the globe and featuring 170 presentations and talks. Topics varied from new developments in the R system, newly implemented statistical methods as well as plethora

Read more »

R Design Flaws #1 and #2: A Solution to Both?

August 25, 2008
By
R Design Flaws #1 and #2:  A Solution to Both?

I’ve previously posted about two design flaws in R. The first post was about how R produces reversed sequences from a:b when a>b, with bad consequences in “for” statements (and elsewhere). The second post was about how R by default drops dimensions in expressions like M when i:j is a sequence only one long (ie,

Read more »