[R] transform excel data into graph
John Kane
jrkrideau at yahoo.ca
Mon Jul 9 15:05:35 CEST 2007
I am not sure exactly what you want but see if this
will work. It will give you a dotchart.
Assume your data.frame is dat
First give the lessons column a name. See ?names
convert numbers in data.frame to a matrix for dotchart
dmat <- as.matrix(dat[,2:4])
Draw dotchart using dat$lessons as a
dotchart(dmat, labels = dat[,1])
--- cross123 <ctsirigos at yahoo.com> wrote:
>
> Hello everyone,
> I have a set of data in the following form, which
> are stored in an Excel
> file:
> nick john peter
>
> lesson1 0.465 0.498 0.473
> lesson2 0.422 0.44 0.134
> lesson3 0.45 0.35 0.543
>
> lesson4 0.590 0.64 0.11
>
> lesson5 0.543 0.5 0.32
>
>
> 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...
>
> Any help would be greatly appreciated.
More information about the R-help
mailing list