Re: [R] problem with indicators for switch

2010-08-02 Thread Charles C. Berry
On Mon, 2 Aug 2010, Roy Davy wrote: Hi, I am having some problems setting up some indicators and would appreciate any help. I have some data called 'lights' with 3 variables called x, a and b. x - is the date a - equals 1 to indicate an 'on' button is activated b - equals 1 to indicate an 'of

Re: [R] problem with indicators for switch

2010-08-02 Thread jim holtman
try this: > x <- read.table(textConnection("a b c d + 0 0 0 0 + 0 0 0 0 + 1 0 1 1 + 1 0 1 2 + 0 0 1 3 + 0 0 1 4 + 1 0 1 5 + 0 0 1 6 + 0 0 1 7 + 0 1 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 0 0 0 0 + 1 0 1 1 + 0 0 1 2 + 0 0 1 3 + 0 0 1 4 + 0 1 0 0 + 0 0 0 0"), header=TRUE) > closeAllConnections() > # in

[R] problem with indicators for switch

2010-08-02 Thread Roy Davy
Hi, I am having some problems setting up some indicators and would appreciate any help. I have some data called 'lights' with 3 variables called x, a and b. x - is the date a - equals 1 to indicate an 'on' button is activated b - equals 1 to indicate an 'off' button is activated Essentiall