Re: [R] sample (randomly select) to get a number of successive days

2018-12-10 Thread Dagmar Cimiotti
Thank you so much Marc, that is exactly what I need. That will save me weeks of work and additionally I learned a lot. :-) Have a great day! Dagmar Hi, Given that your original data frame example is: myframe <- data.frame (Timestamp=c("24.09.2012 09:00:00", "24.09.2012 10:00:00","25.09.2012

Re: [R] ks.test ; impossible to calculate exact exact value with ex-aequos

2018-12-10 Thread Bert Gunter
"Other than correlation, how to check ressemblence between these two curve" (As Ted Indicated) Graph them... and look! There is nothing magical about statistics, which seems to be what you seek. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking thi

Re: [R] ks.test ; impossible to calculate exact exact value with ex-aequos

2018-12-10 Thread Fatma Ell
Thanks a lot for this reply 'a' is a simulated data while 'b' is empirical data. Other than correlation, how to check ressemblence between these two curve in terms of : Amplitude in each row 1...12 Evolution and variability from 1 to 12 Thanks ! Le lundi 10 décembre 2018, Ted Harding a écrit :

Re: [R] ks.test ; impossible to calculate exact exact value with ex-aequos

2018-12-10 Thread Ted Harding
On Mon, 2018-12-10 at 22:17 +0100, Fatma Ell wrote: > Dear all, > I'm trying to use ks.test in order to compare two curve. I've 0 values i > think this is why I have the follonwing warnings :impossible to calculate > exact exact value with ex-aequos > > a=c(3.02040816326531, 7.95918367346939, 10.

Re: [R] ks.test ; impossible to calculate exact exact value with ex-aequos

2018-12-10 Thread Rui Barradas
Hello, That is a warning, not an error. And it documented. In ?ks.test, section Details, the relevant part is The presence of ties always generates a warning, since continuous distributions do not generate them. If the ties arose from rounding the tests may be approximately valid, but even mo

[R] ks.test ; impossible to calculate exact exact value with ex-aequos

2018-12-10 Thread Fatma Ell
Dear all, I'm trying to use ks.test in order to compare two curve. I've 0 values i think this is why I have the follonwing warnings :impossible to calculate exact exact value with ex-aequos a=c(3.02040816326531, 7.95918367346939, 10.6162790697674, 4.64150943396226, 1.86538461538462, 1.125, 1.01

Re: [R] repeating the same variable in formula

2018-12-10 Thread Subirana Cachinero, Isaac
Thank you very much. This is exactly what I needed. Isaac. -Mensaje original- De: peter dalgaard [mailto:pda...@gmail.com] Enviado el: lunes, 10 de diciembre de 2018 15:10 Para: Subirana Cachinero, Isaac CC: Rui Barradas; r-help@r-project.org Asunto: Re: [R] repeating the same variable i

Re: [R] repeating the same variable in formula

2018-12-10 Thread peter dalgaard
You might be looking for this: > all.vars(~chol+age+age, unique=FALSE) [1] "chol" "age" "age" -pd > On 10 Dec 2018, at 11:35 , Subirana Cachinero, Isaac > wrote: > > Thank you for your response. > In fact, I use the formula environament to select variables, as part of the > code of anoth

Re: [R] sample (randomly select) to get a number of successive days

2018-12-10 Thread Marc Schwartz via R-help
Hi, Given that your original data frame example is: myframe <- data.frame (Timestamp=c("24.09.2012 09:00:00", "24.09.2012 10:00:00","25.09.2012 09:00:00", "25.09.2012 09:00:00","24.09.2012 09:00:00", "24.09.2012 10:00:00"), Event=c(50,60

Re: [R] repeating the same variable in formula

2018-12-10 Thread Subirana Cachinero, Isaac
Thank you for your response. In fact, I use the formula environament to select variables, as part of the code of another function. I would like to allow the user to select the same variable more than once. The use of I() may partly solve the problem. However, I would like attr(terms(g),"term.labe

Re: [R] repeating the same variable in formula

2018-12-10 Thread Rui Barradas
Hello, The formulas y ~ cholesterol + age + age and y ~ cholesterol + age are the same formula. If you want 'age' twice, maybe g <- y ~ cholesterol + I(age + age) attr(terms(g), "term.labels") #[1] "cholesterol" "I(age + age)" Hope this helps, Rui Barradas Às 06:49 de 10/12/2018, Subira