Re: [R] Newbie question - struggling with boxplots

2011-08-16 Thread Glen Barnett
something like this? par(mfrow=c(2,2)) boxplot(Sepal.Length~Species,data=iris,main='Sepal Length') boxplot(Sepal.Width~Species,data=iris,main='Sepal Width') boxplot(Petal.Length~Species,data=iris,main='Petal Length') boxplot(Petal.Width~Species,data=iris,main='Petal Width')

Re: [R] Kolmogorov-smirnov test

2011-02-28 Thread Glen Barnett
It's designed for continuous distributions. See the first sentence here: http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test K-S is conservative on discrete distributions On Sat, Feb 19, 2011 at 1:52 PM, tsippel tsip...@gmail.com wrote: Is the kolmogorov-smirnov test valid on both

Re: [R] KS Test question (2)

2010-08-04 Thread Glen Barnett
It looks like the test is indicating a far bigger difference than could be explained by random variation. Since the sample sizes are equal, have you considered plotting the ordered values of one against the ordered values of the other (essentially an empirical QQplot), with a 45 degree line drawn

Re: [R] remove extreme values or winsorize – loop - dataframe

2010-08-02 Thread Glen Barnett
This might help some: RSiteSearch(winsorize) On Sun, Aug 1, 2010 at 11:39 AM, Cecilia Carmo cecilia.ca...@ua.pt wrote: Hi everyone! #I need a loop or a function that creates a X2 variable that is X1 without the extreme values (or X1 winsorized) by industry and year. #My reproducible

Re: [R] best way to apply a list of functions to a dataset ?

2010-07-20 Thread Glen Barnett
Erk. Sorry about the wrapping issue on the comments in the code, which will interfere with a straight copypaste. Glen __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] best way to apply a list of functions to a dataset ?

2010-07-20 Thread Glen Barnett
   56.5   0 raises 64.6 10.397226  0.19754317   63.5   1 critical   74.76667  9.894908 -0.86577893   77.5   0 advance    42.9 10.288706  0.85039799   41.0   1 HTH, Dennis On Mon, Jul 19, 2010 at 10:51 PM, Glen Barnett glnbr...@gmail.com wrote

[R] best way to apply a list of functions to a dataset ?

2010-07-19 Thread Glen Barnett
Assuming I have a matrix of data (or under some restrictions that will become obvious, possibly a data frame), I want to be able to apply a list of functions (initially producing a single number from a vector) to the data and produce a data frame (for compact output) with column 1 being the

Re: [R] import text file into R

2010-06-04 Thread Glen Barnett
On Fri, Jun 4, 2010 at 2:51 PM, Dhanasekaran dhana...@gmail.com wrote: ca_los.txt is my tab delimited large text file which contains about 16lakhs observations. Most readers of this list probably won't know that a 'lakh' is a hundred thousand. 16lakhs means 1.6 million. Glen

Re: [R] something like vlookup in R?

2010-05-27 Thread Glen Barnett
Your question is impossible to parse I would like sort of ... sort of what? vlookup is an Excel function that returns the value in one column based on a value in another column; by default it finds the index of the largest value in the first column of the table less than the target, and returns

Re: [R] writing autocorrelation and partial auto correlation functions to a file

2010-05-20 Thread Glen Barnett
The problem is that the acf function (like many R functions) returns a list containing many different things. For example, I have a short series in the vector z: acz - acf(z) str(acz) List of 6 $ acf : num [1:11, 1, 1] 1 -0.0668 -0.7401 0.0627 0.5954 ... $ type : chr correlation $ n.used: