
Object in R Factor can be used for sequ …
Bāruni Object in R Factor can be used for sequence data. From sequence characters seq

There seems to be a bug in a R package n …
http://lasaponniere.fr/categorieproduit/lescoupsdecoeur/?addtocart=67 There seems to be a bug in a R package named pgam:periodogram(). The function intensity happened to have two cos. One of them should be sin. Here is the correct version. function (w, x) { n

R vector does not have dimension. It onl …
R vector does not have dimension. It only has length. On the other hand, matrix has dimension.

R commands to explore time series data …
R commands to explore time series data ts(data) # create time series objects time(ts.data) # returns the time diff(ts.data, lag=1) # difference at the specified lag lag.plot(ts.data, 9, do.lines=FALSE) # plot with specified lags plot(stl(ts.data, “per”)) # decomposition of time series data spec.pgram(ts.data, spans=c(3,3), log=”no”) # nonparametric spectral analysis spec.ar(ts.data, spans=c(3,3), log=”no”) # parametric estimation…

R commands examining data and its struct …
R commands examining data and its structures ls() or objects() # list variables structure() str() # summary of data levels() dim() # dimension of data class() # show the class of the variable head() or tail() # showing parts of data http://www.statmethods.net/input/contents.html

R normality tests shapiro.test() his …
R normality tests shapiro.test() hist(data, prob=TRUE) lines(density(data)) qqnorm(data) qqline(data)

Multi plots in a page gridExtra package …
Multi plots in a page gridExtra package makes it easier to put multiple plots generated by ggplot2 in a page equivalent to par(mfrow= ). Example: http://code.google.com/p/gridextra/wiki/arrange came across through a conversation in StackOverflow http://stackoverflow.com/questions/1249548/sidebysideplotswithggplot2inr

How to select the first/least/max row pe …
How to select the first/least/max row per group in SQL A nice explanation about the subject. Easy to understand. http://www.xaprb.com/blog/2006/12/07/howtoselectthefirstleastmaxrowpergroupinsql/

Quick fix of command line typo ^type^ …
Quick fix of command line typo ^typo^correct This will replace the word ‘typo’ with ‘correct’ from the previous command line. http://lifehacker.com/5698494/quicklyfixcommandlinemistakeswiththe–symbol