[R] Subject: transform excel data into graph

Nguyen Dinh Nguyen n.nguyen at garvan.org.au
Tue Jul 10 00:54:46 CEST 2007


Is this you want?
library(gplots)

n
<-(0.465,0.422,0.45,0.59,0.543,0.498,0.44,0.35,0.64,0.5,0.473,0.134,0.543,0.
11,0.32)
graph <- matrix(n, nrow=5, ncol=3)

colnames(graph) <- c("Nick", "John", "Peter")
rownames(graph) <- c("Lesson1","Lesson2","Lesson3", "Lesson4","Lesson5")

g <- barplot2(graph, beside = TRUE,
        col = "black",
        angle=c(45,45,90,-45,180),
        density=c(0,20,20,20,20),
        legend = rownames(graph),
        ylim = c(0, 1),
        ylab="lable here",
        plot.grid = TRUE)

N.Nguyen
____________________
What I want to do is a 2d-graph plot where I will have  the name of the
student in the X-axis and the name of the lesson in the Y-axis and the
number from each pair will be used to construct the plot. I am newbie with R
and I don't know which package shall I use nor the commands with which I
will import my data in R so that the plot will be created...



More information about the R-help mailing list