Entering edit mode
Hi.
R should never crash, that's true. What's your version of R? Are you
running R v.2.2.1? Then try to download the latest "patched" version.
Are you running R v2.3.0 devel? Then try to download a newer
version, because bugs get introduced once in a while in the devel
version which are fixed a few days later.
Troubleshooting:
When does it crash? In the read.table() call? Try to narrow it down.
If it is a memory problem, you can always try to through in a gc() in
the end of your for loop. Also, if you're only interested in a few of
the columns, you can the read.table() to ignore all others. See the
help and argument 'colClasses'. That will speed up your reading and
decrease the memory usage. R should still not crash, but you might
avoid the bug this way.
In your script, 'Count' and 'count' are two different objects! Also,
your 'assign(print(i,quote=FALSE),x)' statement is very misleading
(although correct). It's better to split it up in two lines:
print(i,quote=FALSE);
assign(i,x);
/Henrik
On 3/31/06, Hao Liu <liuha at="" umdnj.edu=""> wrote:
> Dear All:
>
> I encountered this several times, could someone point out where the
problem
> is? I don't think it is the memory restriction or something...
>
> I have 345 MAS5 results formated as: probeset_id, expression_value,
PA_call
> in 345 text file. I tried to combine them into one single file, but
only
> retain one probeset_ID column.
>
> This is my commend:
>
> Files<-list.files(pattern=".txt$");
> Count<-0;
> for(i in files) {x<-read.table(i, header=TRUE,sep="\t");
assign(print(i,
> quote=FALSE),x);if(count==0){combined<-x;rm(x);count<-count+1;} else
> {combined<-cbind(combined,x[,2:3]);rm(x);count<-count+1;}}
>
> After processing over 200 files, the program crashes.
>
> Is there a better way to get it done? And, for this large dataset,
if I
> don't want to use RMA -- which is easier to get using justrma, I am
stuck
> here...
>
> Thanks
> Hao
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
http://news.gmane.org/gmane.science.biology.informatics.conductor
>
>
--
Henrik Bengtsson
Mobile: +46 708 909208 (+2h UTC)