Re: [R] Confused with Student's sleep data description

2012-01-27 Thread peter dalgaard
On Jan 27, 2012, at 17:18 , R. Michael Weylandt wrote: > It doesn't have anything to do with attach (which is naughty in other ways!) > rather it's the internal representation of categorical variables (R speak: > factors) that store each level as an integer for memory efficiency but print > t

Re: [R] Confused with Student's sleep data description

2012-01-27 Thread R. Michael Weylandt
It doesn't have anything to do with attach (which is naughty in other ways!) rather it's the internal representation of categorical variables (R speak: factors) that store each level as an integer for memory efficiency but print things with string levels so they look nice to the user. You'll

[R] Confused with Student's sleep data description

2012-01-27 Thread Олег Девіняк
I am confused whether Student's sleep data "show the effect of two soporific drugs" or Control against Treatment (one drug). The reason is the next: > require(stats) > data(sleep) > attach(sleep) > extra[group==1] numeric(0) > group [1] Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Ctl Trt Trt Trt Trt Trt T