[R] graphics question
Paul Lemmens
P.Lemmens at nici.kun.nl
Wed May 15 18:32:41 CEST 2002
--On woensdag 15 mei 2002 8:59 -0700 Thomas Lumley
<tlumley at u.washington.edu> wrote:
> On Wed, 15 May 2002, Paul Lemmens wrote:
>
>> The graph I'm looking for has on the y-axis the RT values (in ms), so
>> this should range from 350 - 450. On the x-axis I want two ticks for
>> each level (sc and oc) of the 'cat' factor. In the plot, three lines
>> should be displayed, for each level of the factor 'loc', pref. including
>> a legend.
>>
>> How do I do this???
>
> Does example(interaction.plot) look like the sort of thing you want?
>
Yes!! This goes a great ways into what I want. However, if I do:
data <- c(390,416,406,396,421,415)
psc <- gl(2,3, labels=c("samecat","othercat"))
loc <- gl(3,2, labels=c("corresp", "noncorresp", "noninf"))
interaction.plot(psc, loc, data)
I get only one line (for noncorresp) which looks as if it is the average of
all data points (2 times the average of 3 points). This makes sense because
of the fun argument of interaction.plot (which, to me, seems to default to
mean). Can I override this with some function that just returns one point
of data??
thnx for the quick response!
Paul
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list