s-news
[Top] [All Lists]

[S] Graph for non-numeric

To: s-news <s-news@wubios.wustl.edu>
Subject: [S] Graph for non-numeric
From: "paul.na" <paul.na@bankofamerica.com>
Date: Thu, 16 Dec 1999 16:01:24 -0500
Sender: owner-s-news@wubios.wustl.edu
Dear Readers:

Case 1: Graph with Numeric Values:
x <- c(1, 2, 3, 4, 5)
y <- c(2, 4, 6, 8, 10)
plot(x, y) would create a graph where x-axis has values of x and y-axis has
values of y.

Case 2: Graph with Non-numeric:
x <- c("a","b","c","d","e")
y <- c(2, 4, 6, 8, 10)
where 2 for "a", 4 for "b", and so on.

How do I create a graph where x-axis indicates components ("a","b","c","d","e")
of x and the components are evenly spaced as if they are 1, 2, 3, 4, 5.  Thank
you very much.

Paul Na
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>
  • [S] Graph for non-numeric, paul.na <=