Re: [Bioc-devel] BiocParallel

2012-11-17 Thread Michael Lawrence
On Fri, Nov 16, 2012 at 8:42 PM, Ryan C. Thompson wrote: > The difference is that in the parallel package, you use mclapply for > multicore and parLapply for multi-machine parallelism. If you want to > switch from one to the other, you have to change all your code that uses > either function to th

Re: [Bioc-devel] Use DataFrame's printing format for data.frames

2012-11-17 Thread Ryan C. Thompson
Actually, my previous post had a small bug in it: it would throw an error when printing a zero-column data frame. The following code fixes this: print.data.frame <- function(df) { if (ncol(df) > 0 && require("IRanges")) { prev.max.print <- getOption("max.print") on.exit(options(max.pri

[Bioc-devel] Use DataFrame's printing format for data.frames

2012-11-17 Thread Ryan C. Thompson
Hi all, I noticed that DataFrame objects have a much faster and more practical printing format than base R's data.frame class. So I wrote a replacement for "print.data.frame" that prints data.frames in the same style as DataFrames. Just stick it in your ~/.Rprofile and your data.frames will m

Re: [Bioc-devel] BiocParallel

2012-11-17 Thread Ryan C. Thompson
On 11/17/2012 02:39 AM, Ramon Diaz-Uriarte wrote: In addition to Steve's comment, is it really a good thing that "all code stays the same."? I mean, multiple machines vs. multiple cores are, often, _very_ different things: for instance, shared vs. distributed memory, communication overhead diff

Re: [Bioc-devel] BiocParallel

2012-11-17 Thread Ryan C. Thompson
In reply to: On 11/16/2012 09:45 PM, Steve Lianoglou wrote: But then you have the situation of multi-machines w/ multiple cores -- is this (2) or (3) here? How do you explicitly write code for that w/ foreach mojo? I guess the answer to that is that you let your "grid engine" (or whatever your

Re: [Bioc-devel] BiocParallel

2012-11-17 Thread Ramon Diaz-Uriarte
On Sat, 17 Nov 2012 00:45:46 -0500,Steve Lianoglou wrote: > Ding! > On Fri, Nov 16, 2012 at 11:42 PM, Ryan C. Thompson > wrote: > > The difference is that in the parallel package, you use mclapply for > > multicore and parLapply for multi-machine parallelism. If you want to switch > > from