Hello, all, First thanks in advance for helping me. I am now handling a data frame, dimension 11095400 rows and 4 columns. It seems work perfect in my MAC R (Mac Pro, Intel Chip with 4G RAM) until I was trying to write this file out using the command: write.table(all,file="~/Desktop/alex.lgen",sep=" ",row.names=F,na="0",quote=F,col.names=F) I got the error message: R(319,0xa000d000) malloc: *** vm_allocate(size=88764416) failed (error code=3) R(319,0xa000d000) malloc: *** error: can't allocate region R(319,0xa000d000) malloc: *** set a breakpoint in szone_error to debug I then confirmed in Windows (Windows XP, 1G RAM) R by trying it again. It seems that it has to do with my R memory limit allocation. I read all the online help and still could not figure out the way to solve the problem. Also I do not understand why the data could be easily handled within R but could not write out due to the insufficient memory. I am not good at both R and computers. Sorry for my naive questions if it sounds bothersome. -- Xiaojing WANG Dept. of Human Genetics Univ. of Pittsburgh, PA 15261 Tel: 412-624-8157 [[alternative HTML version deleted]]
Hi Xiaojing, That's a big table! You might try 'write' (you'll have to work harder to get your data into an appropriate format). You might also try the R-2.7 release candidate, which I think is available here http://r.research.att.com/ for the mac. There was a change in R-2.7 that will make writing large tables without row names more efficient; this might well be where you are running in to problems. Best, Martin Xiaojing Wang wrote:> Hello, all, > > First thanks in advance for helping me. > > I am now handling a data frame, dimension 11095400 rows and 4 columns. It > seems work perfect in my MAC R (Mac Pro, Intel Chip with 4G RAM) until I was > trying to write this file out using the command: > > write.table(all,file="~/Desktop/alex.lgen",sep=" > ",row.names=F,na="0",quote=F,col.names=F) > > I got the error message: > > R(319,0xa000d000) malloc: *** vm_allocate(size=88764416) failed (error > code=3) > R(319,0xa000d000) malloc: *** error: can't allocate region > R(319,0xa000d000) malloc: *** set a breakpoint in szone_error to debug > > > I then confirmed in Windows (Windows XP, 1G RAM) R by trying it again. It > seems that it has to do with my R memory limit allocation. > > I read all the online help and still could not figure out the way to solve > the problem. Also I do not understand why the data could be easily handled > within R but could not write out due to the insufficient memory. I am not > good at both R and computers. Sorry for my naive questions if it sounds > bothersome. > >-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793
Try to write the data.frame to file in blocks of rows by calling write.table() multiple times - see argument 'append' for write.table(). That will probably require less memory. /Henrik On Tue, Apr 15, 2008 at 6:12 PM, Xiaojing Wang <timanwang at gmail.com> wrote:> Hello, all, > > First thanks in advance for helping me. > > I am now handling a data frame, dimension 11095400 rows and 4 columns. It > seems work perfect in my MAC R (Mac Pro, Intel Chip with 4G RAM) until I was > trying to write this file out using the command: > > write.table(all,file="~/Desktop/alex.lgen",sep=" > ",row.names=F,na="0",quote=F,col.names=F) > > I got the error message: > > R(319,0xa000d000) malloc: *** vm_allocate(size=88764416) failed (error > code=3) > R(319,0xa000d000) malloc: *** error: can't allocate region > R(319,0xa000d000) malloc: *** set a breakpoint in szone_error to debug > > > I then confirmed in Windows (Windows XP, 1G RAM) R by trying it again. It > seems that it has to do with my R memory limit allocation. > > I read all the online help and still could not figure out the way to solve > the problem. Also I do not understand why the data could be easily handled > within R but could not write out due to the insufficient memory. I am not > good at both R and computers. Sorry for my naive questions if it sounds > bothersome. > > > -- > Xiaojing WANG > Dept. of Human Genetics > Univ. of Pittsburgh, PA 15261 > Tel: 412-624-8157 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >
What are you going to do with the table after you write it out? Are you just going to read it back into R? If so, have you tried using 'save'? On Tue, Apr 15, 2008 at 12:12 PM, Xiaojing Wang <timanwang at gmail.com> wrote:> Hello, all, > > First thanks in advance for helping me. > > I am now handling a data frame, dimension 11095400 rows and 4 columns. It > seems work perfect in my MAC R (Mac Pro, Intel Chip with 4G RAM) until I was > trying to write this file out using the command: > > write.table(all,file="~/Desktop/alex.lgen",sep=" > ",row.names=F,na="0",quote=F,col.names=F) > > I got the error message: > > R(319,0xa000d000) malloc: *** vm_allocate(size=88764416) failed (error > code=3) > R(319,0xa000d000) malloc: *** error: can't allocate region > R(319,0xa000d000) malloc: *** set a breakpoint in szone_error to debug > > > I then confirmed in Windows (Windows XP, 1G RAM) R by trying it again. It > seems that it has to do with my R memory limit allocation. > > I read all the online help and still could not figure out the way to solve > the problem. Also I do not understand why the data could be easily handled > within R but could not write out due to the insufficient memory. I am not > good at both R and computers. Sorry for my naive questions if it sounds > bothersome. > > > -- > Xiaojing WANG > Dept. of Human Genetics > Univ. of Pittsburgh, PA 15261 > Tel: 412-624-8157 > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem you are trying to solve?