[rkward-users] [Help] RE: How do I create matrix error bars?

SourceForge.net noreply at sourceforge.net
Tue May 11 18:34:25 UTC 2010


The following forum message was posted by tfry at http://sourceforge.net/projects/rkward/forums/forum/165574/topic/3704541:

[quote]You can\'t \"rearrange\" a matrix into a vector[/quote]
[quote]Plus, your suggestion loses the data about variation of the values.[/quote]

It\'s not a vector, it\'s a matrix in \"long\" format. And it does not loose information about the variation. Note that there are several [b]rows[/b] for each point of time, each row corresponding to one measurement.

[quote] I don\'t want to have to deal with the \"rearrangements\" every time.[/quote]

Then read the help page for \"reshape\". This converts your wide example matrix to long format:
[code]reshape (data, direction=\"long\", varying=2:7)[/code]

I suppose some statistics programs may support \"wide\" data format in this particular place. But converting between wide and long is a rather common exercise in any tool.




More information about the Rkward-users mailing list