Try this:

> x
      TF1 TF2 TF3
Gene1 0.0 0.2 0.2
Gene2 1.4 0.0 2.8
Gene3 0.3 0.6 1.7
as.data.frame.table(as.matrix(x))





On Fri, Nov 19, 2010 at 9:08 AM, Adam Streline <astrel...@yahoo.com> wrote:

> Hi, I've looked through the posts but couldn't find a solution to this. I'd
> be
> really grateful if someone could help,
>
> I'd like to convert a data file of mutual information that is formatted as
> a matrix:
>
>             TF1    TF2    TF3    TF200...
> Gene1    0.0    0.2    0.2
> Gene2    1.4    0.0    2.8
> Gene3    0.3    0.6    1.7
> Gene6000....
>
> To a list:
>
> Gene1    TF1    0.0
> Gene1    TF2    0.2
> Gene1    TF3    0.2
> Gene2    TF1    1.4
> Gene2    TF2    0.0
> Gene2    TF3    2.8
> Gene3    TF1    0.3
> Gene3    TF2    0.6
> Gene3    TF3    1.7
> Gene6000...TF200...etc
>
> The matrix is ~6000X200 in size,
>
> Adam
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to