Hi all,

 

I need to make a list as the following format:

$`1555385_at`

[1] "00604" "01031"

 

$`224869_s_at`

[1] NA

 

$`210477_x_at`

 [1] "04010" "04310" "04510" "04620" "04664" "04910" "04912" "04920"
"04930" "05120" "05210"

 

$`212807_s_at`

[1] NA

 

Now I have the following data frame.

> df[1,1]

[1] "1007_s_at"

 

>df[1,2]

[[1]]

 [1] "244"  "501"  "578"  "579"  "604"  "611"  "844"  "877"  "909"
"951"  "954"  "1181" "1305" "1312"

 

How can I use a for loop to make a list object as the above format?

 

I tried the following:

c2v2_safe<-list('12345_at'=strsplit(df[1,2], "\t")[[1]]) and it works.

 

The question is how to replace 12345_at with the df[i, 1] variables.

 

Thanks,

 

AG Lee

 

 


	[[alternative HTML version deleted]]

