Re: [R] collapse a data column into a row

2011-03-09 Thread Fahim Mohammad
gt; strg > [1] > "rc_AI104113_at,rc_AI178259_f_at,rc_AI179134_i_at,rc_AI179134_f_at,rc_AI104113_at,rc_AA819429_f_at" > > # Try to get single quotes surrounding each string > strsep <- paste(scan('strdat.txt', what = '', skip = 1)) > Read 6 items >

[R] collapse a data column into a row

2011-03-09 Thread Fahim Mohammad
I have a file with a data in columnar format like below: probeID rc_AI104113_at rc_AI178259_f_at rc_AI179134_i_at rc_AI179134_f_at rc_AI104113_at rc_AA819429_f_at How can I rewrite it in the format below: 'rc_AI104113_at', 'rc_AI178259_f_at', 'rc_AI179134_i_at', 'rc_AI179134_f_at', 'rc_AI104113_

[R] PRoblem with paste function

2009-09-02 Thread Fahim Mohammad
I am having trouble with paste function. I dont know how to proceed. I tried many options but i failed miserably. I am using a variable f1 to assign a string as below: f1=dataLine[locAffyProbeID]; ( the value of f1 is 244901_at ) Then I am using the paste function paste("set @g1=", f1); in