[Rd] mcmapply Core Usage

2014-05-28 Thread Dario Strbenac
Hello, I have a minimal example that shows a problem I'm having with parallel processing. library(parallel) mcmapply(function(x, y) { print("Running") Sys.sleep(10) }, as.list(1:10), as.list(10:1), mc.cores = 16, SIMPLIFY = FALSE) I see "Running" printed once every ten seconds. I read the d

Re: [Rd] Style question

2014-05-28 Thread Hervé Pagès
Hi Ronald, On 05/28/2014 01:46 PM, Ronald Barry wrote: Greetings, When using a 'foreign' function (from another package, say function 'whatever' from package 'foo'), you can of course just require the package and then just have whatever(...) in your code. However, I would like to use the

[Rd] Style question

2014-05-28 Thread Ronald Barry
Greetings, When using a 'foreign' function (from another package, say function 'whatever' from package 'foo'), you can of course just require the package and then just have whatever(...) in your code. However, I would like to use the foo::whatever(...) form instead, just for documentation pu

Re: [Rd] Ellipsis to Two Functions When One Has Nested Functions

2014-05-28 Thread Brian Lee Yung Rowe
Another option is to use a closure, which isolates the arguments explicitly. aFunction <- function(data, alpha, ...) { transform(alpha, ...) rowMeans(data) > alpha } f <- function(data, selection, ...) { selected <- selection(data) # Remove ellipsis from here plot(data[selected, ], ..

Re: [Rd] Ellipsis to Two Functions When One Has Nested Functions

2014-05-28 Thread Brian Lee Yung Rowe
Another option is to use a closure, which isolates the arguments explicitly. aFunction <- function(data, alpha, ...) { transform(alpha, ...) rowMeans(data) > alpha } f <- function(data, selection, ...) { selected <- selection(data) # Remove ellipsis from here plot(data[selected, ], ..

Re: [Rd] error in the examples of a package

2014-05-28 Thread Luca Braglia
Is addpoints exported? [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] error in the examples of a package

2014-05-28 Thread Frederico Mestre
Hello, I'm buiding a package and then checking for inconsistences, as recomended before submission. Everything works fine until, when it starts to verify the examples, it does not recognize the functions of the package as being loaded. ... * checking examples ... ERROR Running examples in ‘Lan

Re: [Rd] Ellipsis to Two Functions When One Has Nested Functions

2014-05-28 Thread Duncan Murdoch
On 28/05/2014, 2:00 AM, Dario Strbenac wrote: Hello If I have a function aFunction <- function(data, alpha, ...) { transform(alpha, ...) rowMeans(data) > alpha } f <- function(data, selection, ...) { selected <- selection(data, ...) plot(data[selected, ], ...) } f(aDataset