[R] integrating 2 lists and a data frame in R

Bogdan Tanasa tanasa at gmail.com
Tue Jun 6 03:45:53 CEST 2017


 Dear all,

please could you advise on the R code I could use in order to do the
following operation :

a. -- I have 2 lists of "genome coordinates" : a list is composed by
numbers that represent genome coordinates;

let's say list N :

n1

n2

n3

n4

and a list M:

m1

m2

m3

m4

m5

2 -- and a data frame C, where for some pairs of coordinates (n,m) from the
lists above, we have a numerical intensity;

for example :

n1; m1; 100

n1; m2; 300

The question would be : what is the most efficient R code I could use in
order to integrate the list N, the list M, and the data frame C, in order
to obtain a DATA FRAME,

-- list N as the columns names
-- list M as the rows names
-- the values in the cells of N * M, corresponding to the numerical values
in the data frame C.

A little example would be :

      n1  n2  n3 n4

      m1  100  -   -   -

      m2  300  -   -   -

      m3   -   -   -   -

      m4   -   -   -   -

      m5   -   -   -   -
I wrote a script in perl, although i would like to do this in R
Many thanks ;)
-- bogdan

	[[alternative HTML version deleted]]



More information about the R-help mailing list