Re: [R] R on the iPhone/iPad? Not so much....a GPL violation

2010-05-30 Thread Tal Galili
Android + rattle: http://www.r-bloggers.com/data-mining-through-the-android/ Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] Data frame manipulation

2010-05-29 Thread Tal Galili
feel a little foolish about how long i spent trying to do this. Got to love R. From: Tal Galili [via R] [mailto: ml-node+2234184-1067705461-103...@n4.nabble.comml-node%2b2234184-1067705461-103...@n4.nabble.com ] Sent: Friday, May 28, 2010 12:04 AM To: ROLL

Re: [R] adding statistical output to a plot

2010-05-29 Thread Tal Galili
Two things: 1) doing log on rnorm, will get you NaN's because you are doing log on a negative number (some of the time). 2) Running traceback() 5: sort(y) 4: qqplot(x, pch = 16, cex = pt.ht, col = palette()[c(1, 2)], xlab = paste(colnames(x)), ylab = Normal Quantile-Quantile Plot, main =

Re: [R] adding statistical output to a plot

2010-05-29 Thread Tal Galili
Hi Dunner, The way I usually resolve this is by extracting the names with colnames and then reinsert them to the new object. BTW, why are you trying to reproduce the image from minitab? what features in it do you find useful ? Best, Tal Contact

[R] Problem loading RGtk2 (iconv.dll)

2010-05-28 Thread Tal Galili
Hello dear R-help list and Michael Lawrence. I wish to use GTK with R. I installed the newest RGtk2 and GTK from: http://sourceforge.net/projects/gladewin32/files/gtk%2B-win32-devel/2.12.9/gtk-dev-2.12.9-win32-2.exe/download on the path: C:\Program Files\Common Files\GTK\2.0\ And followed the

Re: [R] clustering in R

2010-05-28 Thread Tal Galili
Hi Ayesha, hclust is a way to go (much better then trying to invent the wheel here). Please add what you used to create: distA And create a sample data set to show us what you did, using dput Best, Tal Contact Details:---

Re: [R] Data frame manipulation

2010-05-28 Thread Tal Galili
Hi there, The tool to learn for this is the cast function using the reshape package. In your example you have more then one value for RTL, which you should think of how to account for. But basically, here is a solution to what you asked for (assuming I understood you correctly) require(reshape)

Re: [R] Problem loading RGtk2 (iconv.dll)

2010-05-28 Thread Tal Galili
is on the PATH, the DLLs can conflict. Michael On Thu, May 27, 2010 at 11:06 PM, Tal Galili tal.gal...@gmail.com wrote: Hello dear R-help list and Michael Lawrence. I wish to use GTK with R. I installed the newest RGtk2 and GTK from: http://sourceforge.net/projects/gladewin32/files/gtk%2B

Re: [R] clustering in R

2010-05-28 Thread Tal Galili
Hi Ayesha, I wish to help you, but without a simple self contained example that shows your issue, I will not be able to help. Try using the ?dput command to create some simple data, and let us see what you are doing. Best, Tal Contact

Re: [R] Getting sink to work with message on R 2.11.0 - what didI miss?

2010-05-26 Thread Tal Galili
- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Tal Galili Sent: Friday, May 21, 2010 3:21 PM To: David Winsemius Cc: r-help@r-project.org Subject: Re: [R] Getting sink to work with message on R 2.11.0 - what did I miss? Hi

Re: [R] Getting sink to work with message on R 2.11.0 - what didI miss?

2010-05-26 Thread Tal Galili
below: From: Tal Galili [mailto:tal.gal...@gmail.com] Sent: Wednesday, May 26, 2010 12:26 AM To: Greg Snow Cc: Faiz Rasool; R-help@r-project.org Subject: Re: [R] Getting sink to work with message on R 2.11.0 - what didI miss? Hello Greg, Thank you for the coding. A few questions

Re: [R] Increasing the maximum number of rows

2010-05-23 Thread Tal Galili
Hello Jim, It sounds like a good time to go read about the packages bigmemory and/or ff Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

[R] Capturing R console output into a file (sink+savehistory ??)

2010-05-22 Thread Tal Galili
) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Sat, May 22, 2010 at 12:17 AM, David Winsemius dwinsem...@comcast.netwrote: On May 21, 2010, at 5:02 PM, Tal Galili wrote

Re: [R] Getting sink to work with message on R 2.11.0 - what did I miss?

2010-05-22 Thread Tal Galili
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Tal Galili Sent: Friday, May 21, 2010 3:21 PM To: David Winsemius Cc: r-help@r-project.org Subject: Re: [R] Getting sink to work with message on R 2.11.0 - what did I

Re: [R] Reading results of commands in Microsoft Word typed in the terminal window, A question from a Blind R user.

2010-05-22 Thread Tal Galili
Hello Faiz, I just wrote an extended tutorial that (I believe) fully addresses your question, here: http://www.r-statistics.com/2010/05/helping-the-blind-use-r-by-exporting-r-console-to-word/ (It is based on Greg Snows answer on the other thread, coupled with the article I once wrote on some of

Re: [R] Capturing R console output into a file (sink+savehistory ??)

2010-05-22 Thread Tal Galili
: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Sat, May 22, 2010 at 1:26 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: Tal Galili wrote: After

Re: [R] Getting sink to work with message on R 2.11.0 - what did I miss?

2010-05-22 Thread Tal Galili
) -- On Sat, May 22, 2010 at 12:32 PM, Tal Galili tal.gal...@gmail.com wrote: Hello Greg, This is exactly what I was looking for, thank you very much for both writing the code and of replying here! I'll publish a small hack that uses this with R2wd shortly, in the hopes it will help Faiz request

Re: [R] IF-ELSE question

2010-05-21 Thread Tal Galili
Example: if (abs(-1-1) = 3 abs(1+1) = 3) {print(1)} else {print(2)} Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

[R] Getting sink to work with “message” on R 2.11.0 - what did I miss?

2010-05-21 Thread Tal Galili
Hi all, I am trying to use type message with sink, like this: sink(all.Rout, type=message) 1+3 sink() readLines(con = all.Rout) So to get the following output: 1+3 [1] 4 Obviously this doesn't work. I tried some variations (based on the explanations in the help) but am missing something

Re: [R] Getting sink to work with “message” on R 2.11.0 - what did I miss?

2010-05-21 Thread Tal Galili
-statistics.com (English) -- On Sat, May 22, 2010 at 12:17 AM, David Winsemius dwinsem...@comcast.netwrote: On May 21, 2010, at 5:02 PM, Tal Galili wrote: Hi all, I am trying to use type message

Re: [R] Deleting a file on a drive from within R

2010-05-20 Thread Tal Galili
Check out: ?unlink Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] writing function

2010-05-20 Thread Tal Galili
Try this: paste(tot, 4:16, sep = ) Or: func - function(x,y) { paste(tot, x:y, sep = ) } func(4,16) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] Generating all possible models from full model

2010-05-19 Thread Tal Galili
Do you mean only all of the FIRST order models (that is, without interactions) ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] Generating all possible models from full model

2010-05-19 Thread Tal Galili
given a full model with all desired terms, where some terms may have interactions and others don't. Tim Clark Department of Zoology University of Hawaii --- On *Tue, 5/18/10, Tal Galili tal.gal...@gmail.com* wrote: From: Tal Galili tal.gal...@gmail.com Subject: Re: [R] Generating all

Re: [R] Generating all possible models from full model

2010-05-19 Thread Tal Galili
) | www.r-statistics.com (English) -- On Wed, May 19, 2010 at 5:01 PM, Ben Bolker bol...@ufl.edu wrote: Tal Galili tal.galili at gmail.com writes: On Wed, May 19, 2010 at 7:38 AM, Tim Clark mudiver1200

Re: [R] Calling R-tists

2010-05-19 Thread Tal Galili
Hi Katharine, Very cool idea! I republished your call on my blog: http://www.r-statistics.com/2010/05/user-2010-is-looking-for-a-t-shirt-design/ And encourage people who will create such a design to link to it (for example by posting about it here on the list), and also to tag it (if they put it

Re: [R] Generating all possible models from full model

2010-05-19 Thread Tal Galili
AICcmodavg to generate model averages. I have read a lot about the problems of stepwise selection, so I am trying to find something besides regsubsets() from leaps package. Thanks, Tim Tim Clark Department of Zoology University of Hawaii --- On *Wed, 5/19/10, Tal Galili tal.gal...@gmail.com

Re: [R] p value

2010-05-16 Thread Tal Galili
Hi Soham, I don't feel your question is well defined. But an equally ill defined answer would be: Through a permutation test. Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com

Re: [R] Dataframe to word, using R2wd

2010-05-15 Thread Tal Galili
Hi Jeremy, 1) This is not the command to use on data.frames, it is: wdTable 2) There is a slightly newer version of R2wd, that (for now) can only be downloaded here: http://www.r-statistics.com/2010/05/exporting-r-output-to-ms-word-with-r2wd-an-example-session/ (That posts also offers a step by

Re: [R] Dataframe to word, using R2wd

2010-05-15 Thread Tal Galili
Biologist Department of the Interior US Fish Wildlife Service California, USA - Original Message From: Tal Galili tal.gal...@gmail.com To: Jeremy Miles jeremy.mi...@gmail.com Cc: r-help@r-project.org Sent: Sat, May 15, 2010 1:03:12 AM Subject: Re: [R] Dataframe to word, using

Re: [R] Revolution R and the R Community?

2010-05-12 Thread Tal Galili
) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Wed, May 12, 2010 at 2:17 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 11/05/2010 4:03 PM, Tal Galili wrote: Hi Iaw (or Ivo ?!), I

Re: [R] Removing points

2010-05-12 Thread Tal Galili
Hi Egg, please read this: http://www.statmethods.net/management/subset.html Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] Smoothing Techniques - short stepwise functions with spikes

2010-05-11 Thread Tal Galili
Hi Ralf, I can't offer you many resources, but the few I came across are: 1) loess (or the older version: lowess) 2) smooth 3) rollapply (from the zoo pacakge) I used a combination of 1 and 3 when creating an R implementaion for a (simplistic) quantile loess, you might find the code useful:

Re: [R] Revolution R and the R Community?

2010-05-11 Thread Tal Galili
Hi Iaw (or Ivo ?!), I have seen REvolution in useR 2009. I personally know one of the students they sponsored once, and have been following David Smith's (great) online work for over a year now. REvolution is real, and I hope they (and more companies like them) will flourish in the future. I

[R] What are your thoughts about the R programming wiki-book ?

2010-05-11 Thread Tal Galili
or interest in such a project by members of the R community. Tal Galili Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r

Re: [R] Count cases in a list

2010-05-08 Thread Tal Galili
Hi Sebastian, Please add an example to the code you made, so to make it easier to help you. p.s: it seems possible to make it faster using lapply Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read

Re: [R] Count cases in a list

2010-05-08 Thread Tal Galili
Hi Sebastian, Please check if this does what you want: nombreL - c(Alvaro Perez, Sebastián García, Luis Gomez, Jorge Rial, Ronaldo Apud, Ana María Bianco) nombreC - c(Alvaro, Ana,Jorge,Ronaldo, Sebastian) func1 - function(x) { grep(x, noquote(nombreL)) } lapply(noquote(nombreC), func1)

Re: [R] meaning of -

2010-05-08 Thread Tal Galili
try: ?- This is used for assigning to an object that exists in a parent environment from which you made the assigning (thus allows some playing with R's lexical scoping). Contact Details:--- Contact me: tal.gal...@gmail.com |

Re: [R] Count cases in a list

2010-05-08 Thread Tal Galili
) -- On Sat, May 8, 2010 at 11:22 AM, Sebastian Kruk residuo.so...@gmail.comwrote: 2010/5/8 Tal Galili tal.gal...@gmail.com: Hi Sebastian, Please check if this does what you want: nombreL - c(Alvaro Perez, Sebastián García, Luis Gomez, Jorge Rial

Re: [R] Count cases in a list

2010-05-08 Thread Tal Galili
Tal Galili tal.gal...@gmail.com: Hi Sebastian, Please check if this does what you want: nombreL - c(Alvaro Perez, Sebastián García, Luis Gomez, Jorge Rial, Ronaldo Apud, Ana María Bianco) nombreC - c(Alvaro, Ana,Jorge,Ronaldo, Sebastian) func1 - function(x) { grep(x, noquote

Re: [R] Any way to apply TWO functions with tapply()?

2010-05-07 Thread Tal Galili
Look at the reshape package - it allows that when using cast Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

Re: [R] Data frame pivoting

2010-05-06 Thread Tal Galili
Hi Angelo, You can solve thins using the melt and cast functions in the reshape package. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il

[R] How to solve: Error with Anova {car} due to deficient rank ?

2010-05-06 Thread Tal Galili
Hello all, I am getting the following error: Error in linear.hypothesis.mlm(mod, hyp.matrix.1, SSPE = SSPE, V = V, : The error SSP matrix is apparently of deficient rank = 7 11 After running: mod.ok - lm(as.matrix(dat[,-1]) ~ DC, data=dat) (av.ok - Anova(mod.ok, idata=idata,

Re: [R] How to solve: Error with Anova {car} due to deficient rank ?

2010-05-06 Thread Tal Galili
where the value is 4 for every case, the analysis can't be performed. Cheers Joris What is it you want to know exactly? On Thu, May 6, 2010 at 11:57 AM, Tal Galili tal.gal...@gmail.com wrote: Hello all, I am getting the following error: Error in linear.hypothesis.mlm(mod, hyp.matrix.1

Re: [R] How to solve: Error with Anova {car} due to deficient rank ?

2010-05-06 Thread Tal Galili
aliasing to expect anything decent coming out of such an analysis. Sorry to break it to you, but this is a classic case of analysis died due to a lack of useable data. Cheers Joris On Thu, May 6, 2010 at 1:42 PM, Tal Galili tal.gal...@gmail.com wrote: Hi Joris, Thank you for taking

Re: [R] How to solve: Error with Anova {car} due to deficient rank ?

2010-05-06 Thread Tal Galili
) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Thu, May 6, 2010 at 4:47 PM, peter dalgaard pda...@gmail.com wrote: On May 6, 2010, at 1:42 PM, Tal Galili wrote: Hi Joris, Thank

Re: [R] What is the best way to have R output tables in an MS Word format?

2010-05-06 Thread Tal Galili
) -- On Mon, May 3, 2010 at 4:47 PM, Chris Evans chrish...@psyctc.org wrote: Thanks Tal Thomas, I am now experimenting with both SWord and R2wd and both are certainly a huge step forward for me, tied as I am to Word and the Windoze/M$ world for now. Chris Tal Galili sent

[R] OLS Regression diagnostic measures check list - what to consider?

2010-05-05 Thread Tal Galili
Hello dear R help list, I wish to compile a check-list for diagnostic measures for OLS regression. My question: Can you offer more (or newer) tests/measures for the validity of a linear model then what is given here: http://www.statmethods.net/stats/rdiagnostics.html This resource gives a list

Re: [R] R for web browser

2010-05-04 Thread Tal Galili
I wrote about R-Node last month, it offers what you are talking about: http://www.r-statistics.com/2010/04/r-node-a-web-front-end-to-r-with-protovis/ Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read

Re: [R] Odp: What is the best way to have R output tables in an MS Word format?

2010-05-03 Thread Tal Galili
To continue Petr suggestion, a simple variation for this would be to use sink() Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

[R] Comparing the correlations coefficient of two (very) dependent samples

2010-05-03 Thread Tal Galili
Hello all, I believe this can be done using bootstrap, but I am wondering if there is some other way that might be used to tackle this. #Let's say I have two pairs of samples: set.seed(100) s1 - rnorm(100) s2 - s1 + rnorm(100) x1 - s1[1:99] y1 - s2[1:99] x2 - x1 y2 - s2[2:100] #And both yield

Re: [R] Resize Graphics Window

2010-05-02 Thread Tal Galili
Hi Sigal, could you give a simple example ? I can imagine in some cases that enlarging the windows would help, but on others there are other parameters you would like to play with instead. So having an example to solve, will help people help you. Tal Contact

Re: [R] Replace query

2010-05-02 Thread Tal Galili
The following code might work: a[a==1] - b[a==1] But it depends on what a and b are exactly (vector, matrix, list, data.frame). Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] Re :reading large file

2010-05-01 Thread Tal Galili
Hi Mohan, Check: dim(bmtrend) If the output is like the dimension of your data, then it would appear you succeeded in reading in the data :) Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845

[R] stars plot - how to changing petal angle by weight ?

2010-05-01 Thread Tal Galili
Hello all, I am wondering how the ?stars function might be changed so it will get another parameter (petal.weight) that describes the weight for each petal of the flower (star) plot. The way this weight will effect is by reducing the angle of the petal by the weights proportion. So for example,

Re: [R] What is the best way to have R output tables in an MS Word format?

2010-05-01 Thread Tal Galili
Hi all, I forwarded this question to the r-com mailing list, and received the following reply from Thomas Baier : Hi Tal, two solutions immediately come to my mind: SWord (http://rcom.univie.ac.at) and R2wd (from CRAN). If creating a paper in Word, then SWord may be the better choice, if you

Re: [R] How to generate a distance matrix?

2010-04-30 Thread Tal Galili
Wouldn't the ?dist function help you ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Newbie question

2010-04-30 Thread Tal Galili
Hi Bill (or William) What plot do you want to create ? (scatter plot, boxplot, so on?) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il

[R] Split a vector by NA's - is there a better solution then a loop ?

2010-04-29 Thread Tal Galili
Hi all, I would like to have a function like this: split.vec.by.NA - function(x) That takes a vector like this: x - c(2,1,2,NA,1,1,2,NA,4,5,2,3) And returns a list of length of 3, each element of the list is the relevant segmented vector, like this: $`1` [1] 2 1 2 $`2` [1] 1 1 2 $`3` [1] 4 5 2

Re: [R] Split a vector by NA's - is there a better solution then a loop ?

2010-04-29 Thread Tal Galili
] ) + } foo( x ) $`1` [1] 2 1 2 $`2` [1] 1 1 2 $`3` [1] 4 5 2 3 Romain Le 29/04/10 09:42, Tal Galili a écrit : Hi all, I would like to have a function like this: split.vec.by.NA- function(x) That takes a vector like this: x- c(2,1,2,NA,1,1,2,NA,4,5,2,3) And returns a list

[R] Request - adding recycled lwd parameter to polygon

2010-04-29 Thread Tal Galili
Hello dear members of R-help and R-core mailing list, I am not sure if this request is a ticket that should be filled somewhere outside the mailing list. If so, I apologize for not doing and would like to know where I should have filled it. And to the subject matter: I would like to use a

Re: [R] Can't load doSMP from REvolutionR in regular R2.11.0

2010-04-29 Thread Tal Galili
Hi Tao, Thanks for the file - it works great for me. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

Re: [R] Can't load doSMP from REvolutionR in regular R2.11.0

2010-04-28 Thread Tal Galili
I get the same error and would be happy for a solution as well. Thanks, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] multiple paired t-tests without loops

2010-04-27 Thread Tal Galili
Hi Matthew, First - I fully support Greg Snow proposition. Sampling is the way to go here. But besides that: 1) Try to avoid using data.frames as much as possible (use vectors and matrixes instead - they are usually faster) 2) Since you are running on a loop, you can try running it in parallel

Re: [R] Upgrading R using the global library folder strategy - what do you think about it?

2010-04-26 Thread Tal Galili
Hi Daniel, Thanks for taking the time to go through this. You wrote: I don't see the advantage over using the R_LIBS environment variable You are correct - there is no advantage *over *doing that, because that is * exactly* what my code is doing :) You wrote: You need to initially copy

Re: [R] Using optim function for logistic model simulation

2010-04-26 Thread Tal Galili
Hi Charlotte , I can't reproduce your code, but skimming through it - It would appear that: 1) in eqn1- function(K1, bird) you didn't define bird (you did define it before the function, so I'd suggest just removing it from the function call like this: eqn1- function(K1) 2) you didn't return and

Re: [R] Using optim function for logistic model simulation

2010-04-26 Thread Tal Galili
: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) -- On Mon, Apr 26, 2010 at 11:08 AM, Tal Galili tal.gal...@gmail.com wrote: Hi Charlotte , I can't reproduce your

Re: [R] PDF text to work with maps.

2010-04-26 Thread Tal Galili
Have a look here: http://www.r-bloggers.com/a-free-book-on-geostatistical-mapping-with-r/ http://www.r-bloggers.com/a-free-book-on-geostatistical-mapping-with-r/ Contact Details:--- Contact me: tal.gal...@gmail.com |

Re: [R] Cluster analysis: dissimilar results between R and SPSS

2010-04-26 Thread Tal Galili
Hi Jeoffrey, How stable are the results in general ? If you repeat the analysis in R several times, does it yield the same results ? Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] help on autocorrealtion time

2010-04-26 Thread Tal Galili
Do you mean ccf ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

Re: [R] Finding First of a Type in a Sequence

2010-04-26 Thread Tal Galili
Try this: func - function(x) { which.negative - which(x0) index.to.return - which.negative[which.negative which.max(x)][1] return(index.to.return) } func(x) Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com |

Re: [R] data frame

2010-04-26 Thread Tal Galili
you can do this: a - tapply(VAR, YEAR, prod) The use merge to create a new variable of the length of your original VAR, and just do VAR/prod.VAR Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

[R] Why am I getting different results from cor VS ccf ?

2010-04-26 Thread Tal Galili
Hi all, I am getting different results from ccf and cor, Here is a simple example: set.seed(100) N - 100 x1 - sample(N) x2 - x1 + rnorm(N,0,5) ccf(x1,x2)$acf[ccf(x1,x2)$lag == -1] cor(x1[-N], x2[-1]) Results: ccf(x1,x2)$acf[ccf(x1,x2)$lag == -1] [1] -0.128027 cor(x1[-N], x2[-1]) [1]

Re: [R] Why am I getting different results from cor VS ccf ?

2010-04-26 Thread Tal Galili
) | www.r-statistics.com (English) -- On Mon, Apr 26, 2010 at 8:49 PM, Tal Galili tal.gal...@gmail.com wrote: Hi all, I am getting different results from ccf and cor, Here is a simple example: set.seed

Re: [R] How do you change library location ? (in R under windows XP)

2010-04-26 Thread Tal Galili
@gmail.com wrote: On Fri, 23 Apr 2010 15:22:45 +0300, Tal Galili tal.gal...@gmail.com wrote: Due to the new R 2.11 release, I want to implement Dirk's suggestion here http://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r . So for that I am asking - How

Re: [R] Histogram not plotting correct breaks

2010-04-26 Thread Tal Galili
trying setting br = 40 inside the hist, and check if that helps... (breaks won't do it for you either way) Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] Bhapkar V test

2010-04-26 Thread Tal Galili
Hi Karl, I don't think this is the solution, but just in case - the coin package has a reference for the: homogeneity statistic W of * Bhapkar* (1966) Might it be related to V test ? Best, Tal Contact Details:--- Contact me:

Re: [R] Problem with 'lars' package

2010-04-26 Thread Tal Galili
The CRAN website is down, and will remain so for the next few hours, see link for alternative images: http://www.r-bloggers.com/r-project-websites-down/ Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845

Re: [R] Noobie question on aggregate tapply and by

2010-04-25 Thread Tal Galili
Here is one solution for your question: mean.data - with(DF, tapply(data, years, mean, na.rm = T)) mean.data2 - with(DF, tapply(data2, years, mean, na.rm = T)) cbind(mean.data , mean.data2) Another one would be for you to read about the package plyr (which is better for this job, actually) And

Re: [R] how to import a dataframe with mixed text and numbers

2010-04-25 Thread Tal Galili
I would try using something like read.table with read.table(..., sep = ---) And then clean the variables one by one (you'll need to search the mailing list for help on time variables. And also for ways to search and replace text - all exist as answers here)

[R] Upgrading R using the global library folder strategy - what do you think about it?

2010-04-25 Thread Tal Galili
Hello dear R-help mailing list, The other day I published a blog post (with some R code) to help R-users who want to implement a simpler upgrading strategy for R (under windows - but probably the same will be true of mac OS, I am not sure about Linux). This e-mail has 3 goals: (a) To share, (b)

Re: [R] how to make read in a vector of 0s and 1s with no space between them

2010-04-25 Thread Tal Galili
*Solution:* strsplit(c(10110100101001011101011), ) But make sure you change the output data type to the one you like (boolean, numeric and so on) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me:

Re: [R] Image into Excel file from R

2010-04-25 Thread Tal Galili
Hi Harsh, I don't know the answer, But I would suggest you search and look at: rcom Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |

Re: [R] replace question mark with a dash

2010-04-25 Thread Tal Galili
Here you go :) require(stringr) t( apply(mydf, 1, function(x) {str_replace(x, \\?, -))}) ) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il

Re: [R] Growth potential for open source math tools: 10 questions

2010-04-25 Thread Tal Galili
Maybe I missed something - but *why* should we do it? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

[R] How do you change library location ? (in R under windows XP)

2010-04-23 Thread Tal Galili
Due to the new R 2.11 release, I want to implement Dirk's suggestion herehttp://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r . So for that I am asking - How can I (permanently) change R's library path? (The best solution would be one that can be run from within

[R] I am failing to run the (windows) example in: help(Startup)

2010-04-23 Thread Tal Galili
Hi all, Inside: help(Startup) There is an example suggesting: ## Example .Renviron on Windows R_LIBS=C:/R/library If I update the file: Rprofile.site in etc When I start R I get: Error: 16:10: unexpected '/' 16: R_LIBS=C:/ ^ Of course, if I put it in quotes it works, But I

Re: [R] I am failing to run the (windows) example in: help(Startup)

2010-04-23 Thread Tal Galili
) -- 2010/4/23 Uwe Ligges lig...@statistik.tu-dortmund.de Am 23.04.2010 14:54, schrieb Tal Galili: Hi all, Inside: help(Startup) There is an example suggesting: ## Example .Renviron on Windows R_LIBS=C:/R

[R] After updating packages I got Error in normalizePath(path) for one of the packages

2010-04-23 Thread Tal Galili
Hi all, The error I got was this: Error in normalizePath(path) : path[1]=C:\Program Files\R\library/gdata: The system cannot find the file specified (after some other packages updated fine) For running: update.packages(checkBuilt=TRUE, ask=FALSE) My sessionInfo (): R version 2.11.0

Re: [R] long output in R

2010-04-22 Thread Tal Galili
Not answering your question, But if you where to ask this regarding plots, the answer would be to use: par(ask = T) Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com

[R] R2.11.0 - rasterImage() and barplot fill-patterns

2010-04-22 Thread Tal Galili
Hello Peter, Thank you, and the R core team, for the new release. I see that in R 2.11.0 there is now support for rendering of raster (bitmap) images through rasterImage(). I am wondering - can this be used to create a texture/fill-pattern for hist()/barplot() ? (A request made several times

Re: [R] index ordering

2010-04-22 Thread Tal Galili
Ah. Close to what David suggested... Try: ?which.max Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com

[R] Can I compare two clusters without using their distance-matrix (dist()) ?

2010-04-21 Thread Tal Galili
Hello all, I would like to compare the similarity of two cluster solutions using a validation criteria (such as Hubert's gamma coefficient, the Dunn index the corrected rand index and so on) I see (from here:http://www.statmethods.net/advstats/cluster.html) that the function cluster.stats() in

Re: [R] Can I compare two clusters without using their distance-matrix (dist()) ?

2010-04-21 Thread Tal Galili
-dortmund.de On 21.04.2010 18:15, Tal Galili wrote: Hello all, I would like to compare the similarity of two cluster solutions using a validation criteria (such as Hubert's gamma coefficient, the Dunn index the corrected rand index and so on) I see (from here:http://www.statmethods.net

Re: [R] Can I compare two clusters without using their distance-matrix (dist()) ?

2010-04-21 Thread Tal Galili
=TRUE) cs - cluster.stats(d=matrix(0,ncol=100,nrow=100),c1,c2,compareonly=TRUE) cs$corrected.rand cs$vi Hope this helps, Christian On Wed, 21 Apr 2010, Tal Galili wrote: Thanks for the fast reply Uwe. My hope in posting this was to find if anyone had already done work (in R

[R] Community help: creating Syntax-Highlighter-brush for R and WordPress.com

2010-04-21 Thread Tal Galili
Hello dear R community, *Background:* Since I see more and more R users who blog about R opening their blogs in WordPress.com, I contacted one of their workers asking if they could add Syntax highlight support for R. He replied to me saying that if there was a Brush for R, according to the format

[R] Extracting the coefficients of each local polynomial from loess()

2010-04-19 Thread Tal Galili
Hello dear R users and Prof. Brian Ripley, I am searching for a way to extract the estimated coeffiicents of each local polynomial at given x from loess(). After searching and

Re: [R] comparing attitudes of 2 groups / likert scales?

2010-04-19 Thread Tal Galili
Good luck in your work, The simple solution would be to run many non-paired wilcox on all the 20 questions (the way Dieter suggested). In which case, make sure to adjust for multiple comparisons. Read about it, and see: ?p.adjust If you have some questions you can merge (by a simple mean of

Re: [R] Tinn-R

2010-04-19 Thread Tal Galili
Consider trying notepad++ with NppToR That's what I use (it also works with the REvolution distribution) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) |

Re: [R] Loess Fit

2010-04-18 Thread Tal Galili
Where do I nominate this to be a fortune ? Q (Karl Ove Hufthammer ): Why not use 'predict.loess' (i.e., 'predict' on a loess object) directly? A (Greg Snow): Because that would be simple, straight forward, and make sense, and not require knowledge about less obvious functions. Although for the

<    1   2   3   4   5   6   7   8   >