Re: [R] Finding a mean value of a variable holding a dummyvariablefixed

2008-03-31 Thread Daniel Malter
(I don't recall any Prime Minister called Johnson or Nixon, by the way...) That's why the variable was called president. prime.minister is four letters and a dot longer. That was too complicated ;) - cuncta stricte discussurus -

Re: [R] Finding a mean value of a variable holding a dummyvariablefixed

2008-03-30 Thread Bill.Venables
Here is another way, starting with similar dummy data: PMData - data.frame(PM = c(Thatcher, Thatcher, Thatcher, Thatcher, Thatcher, Thatcher,Major, Major, Major, Major, Major, Major), approval = c(3, 4, 5, 6, 7,