Re: [R] Assigning factor names to interaction plot

2011-10-03 Thread Dennis Murphy
Hi: A small toy example: fakedata <- data.frame(group = factor(rep(1:3, each = 10), labels = paste('Therapy', 1:3)), city = factor(rep(c('Amsterdam', 'Rotterdam'), each = 5)), pressure = rnorm(30)) with(fakedata, interaction.plot(group, city, pressure, t

[R] Assigning factor names to interaction plot

2011-10-03 Thread flokke
Hi everyone, I have the following problem: I have three variables, 'group', 'city' and 'pressure' There is an interaction effect between group and city and I'd like to show this in an interaction plot: interaction.plot(group, city, pressure, type="b", col= c(1:2),