[R] converting matrics in R
Indbryn Morten
Morten.Indbryn at indman.sintef.no
Wed Jan 2 14:41:59 CET 2002
Hi
I have a problem with converting a matrics in R
R has almost the same syntaxes as S-PLUS have so I have also tried to use
the manual for that software.
My problem is that i have read data in from a database through a RODBC
connection and this data is not represented in the right form.
The data I have read in, is represented as productnumber in first collumn,
weeknumber in the second and a messurment in the third.
I want to represent the data as productnumber downwards(rows) and weeknumber
horisontally(collumns) and the vallue of the cells should be the messurment.
I have looked at a function called "reshapeWide" which I thoght wold handle
such a problem but I only get an error message.
I have tried to convert the the data when the data was both original and wen
converted to dataframe.
Do sombody else now about other functions which can be used?. Do I have to
make a new function (programming in R)?
Thank you in advance
Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20020102/58d98d0c/attachment.html
More information about the R-help
mailing list