Re: [R-es] funcion aggregate por mes

2017-09-05 Thread Javier Marcuzzi
Estimado Javier Valdes Cantallopts Yo creo que anduve por esos lados, no lo recuerdo en forma correcta para enviarle mi solución pero se puede y busque una en internet, mire las dos últimas opciones. (lo que puede dar trabajo es codificar correctamente la fecha)

[R-es] funcion aggregate por mes

2017-09-05 Thread Javier Valdes Cantallopts (DGA)
Estimados: Quería saber si alguno de uds ha podido realizar operación simples(sumar, media por ejemplo) usando la función AGGREGATE. La idea es obtener los LA MEDIA de las T° por cada mes, desde una planilla de CON DATOS CADA 10 MINUTOS, La planilla base es algo así; Fecha(día mes año)

Re: [R] Interesting behavior of lm() with small, problematic data sets

2017-09-05 Thread mark . hogue
Tim, I think what you're seeing is https://en.wikipedia.org/wiki/Loss_of_significance. Cheers, Mark From: "Glover, Tim" To: "r-help@r-project.org" Date: 09/05/2017 11:37 AM Subject:[R] Interesting behavior of lm() with small,

Re: [R] Interesting behavior of lm() with small, problematic data sets

2017-09-05 Thread David Winsemius
> On Sep 5, 2017, at 6:24 AM, Glover, Tim wrote: > > I've recently come across the following results reported from the lm() > function when applied to a particular type of admittedly difficult data. > When working with > small data sets (for instance 3 points) with the

Re: [R] Interesting behavior of lm() with small, problematic data sets

2017-09-05 Thread Jeff Newmiller
Why does an unreliable fit have to provide "reasonable" results? More specifically, p-values arise from observed distributions... if your slopes are "in the noise" then the slope estimate's location within that distribution could be anywhere relative to the center and spread of that very narrow

Re: [R] [FORGED] Re: Block comment?

2017-09-05 Thread S Ellison
> Do not the same considerations essentially apply to the well established > /* */ convention used in C? Well maybe you simply *can't* get the "*/" > string within a block of C code, but still Yes, the same problem arises in C. And you _can_ get */ in valid code - as the closing part

[R] Interesting behavior of lm() with small, problematic data sets

2017-09-05 Thread Glover, Tim
I've recently come across the following results reported from the lm() function when applied to a particular type of admittedly difficult data. When working with small data sets (for instance 3 points) with the same response for different predicting variable, the resulting slope estimate is a

Re: [R] Strange lazy evaluation of default arguments

2017-09-05 Thread Jeff Newmiller
>In the future, I’ll avoid dependencies between parameters. You don't need to cut off your nose to spite your face... you are the one writing the code that breaks the dependency, so you have the option to not write your code that way (e.g. by using force() as Rui suggests). -- Sent from my

Re: [R] Strange lazy evaluation of default arguments

2017-09-05 Thread Matthias Gondan
Dear S Ellison, Thanks for the flowers! Indeed, I was actually considering to use it in my own teaching material, as well. With rounded numbers, of course. Though I am still slightly disturbed about this feature. I thought, now it is the time to switch to Python, but that’s even worse, see

Re: [R] Sample size calculation for three-way incomplete block crossover study.

2017-09-05 Thread Bert Gunter
Sounds like a homework problem. This list has a no homework policy if it is. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Mon, Sep 4, 2017 at

Re: [R] Strange lazy evaluation of default arguments

2017-09-05 Thread S Ellison
Mathias, If it's any comfort, I appreciated the example; 'expected' behaviour maybe, but a very nice example for staff/student training! S Ellison > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Matthias > Gondan > Sent: 02 September 2017 18:22 >

Re: [R-es] Condiciones en data.table

2017-09-05 Thread Carlos Ortega
Hola, Es que la forma de preguntar por "x" en tu data.table se tiene que hacer como aparece destacado en lo siguiente... > dt <- data.table("x"=c(1,3,4), "y"=c(6:8)) > dt[x==x] x y 1: 1 6 2: 3 7 3: 4 8 > dt[x] x y 1: 4 8 *> dt[,x]* *[1] 1 3 4* > dt[x=="x"] Empty data.table (0 rows) of 2

Re: [R] Dataframe Manipulation

2017-09-05 Thread Ulrik Stervbo
Hi Hemant, data_help <- data_help %>% # Add a dummy index for each purchase to keep a memory of the purchase since it will dissappear later on. You could also use row number mutate(Purchase_ID = 1:n()) %>% # For each purchase id group_by(Purchase_ID) %>% # Call the split_items function, which