Thank you very much for all replies:) Here is my working code:
for(i in ls(pattern="P_")){print(head(get(i),2))}
On Monday, August 11, 2014 11:04 AM, Greg Snow <538...@gmail.com> wrote:
In addition to the solution and comments that you have already
received, here are a couple of additional
In addition to the solution and comments that you have already
received, here are a couple of additional comments:
This is a variant on FAQ 7.21, if you had found that FAQ then it would
have told you about the get function.
The most important part of the answer in FAQ 7.21 is the last part
where
On 09/08/14 06:25, Fix Ace wrote:
I have 16 files and would like to check the information of their first two
lines, what I did:
ls(pattern="P_")
[1] "P_3_utr_source_data" "P_5_utr_source_data"
[3] "P_exon_per_gene_cds_source_data" "P_exon_per_gene_source_data"
[5] "P_ex
> for(i in ls(pattern="P_")){ head(get(i), 2)} # Should work.
You also need to use print(head(...)) if you want to see the printed
output from each iteration.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Fri, Aug 8, 2014 at 4:36 PM, David Winsemius wrote:
>
> On Aug 8, 2014, at 11:25 AM,
On Aug 8, 2014, at 11:25 AM, Fix Ace wrote:
> I have 16 files and would like to check the information of their first two
> lines, what I did:
>
>
>> ls(pattern="P_")
> [1] "P_3_utr_source_data" "P_5_utr_source_data"
> [3] "P_exon_per_gene_cds_source_data" "P_ex
5 matches
Mail list logo