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 retu

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 > T

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 10:31

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 here

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 phon

[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 r

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 of

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] 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 same response for diffe

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, problematic data sets Sent by:"R-help"