[R] clusterMap: static vs dynamic scheduling

2015-08-12 Thread Rguy
The clusterMap function provides the following argument .scheduling = c(static, dynamic) The default is static. When is it advisable to use dynamic? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and

[R] Old g++ in Rtools

2014-08-06 Thread Rguy
I recently downloaded Rtools. I see the g++ version is gcc version 4.6.3 20111208 (prerelease) (GCC) I also recently downloaded MinGW. Its version of g++ is gcc version 4.8.1 (GCC) I believe that later versions of g++ provide better support for C++11. Why does Rtools provide a version

[R] mapply echoes function call when browser() is called from within FUN

2014-04-26 Thread Rguy
When mapply is applied to a function that has a call to browser() within it, the result can be a disastrous amount of feedback. To clarify this situation please consider the following function, containing a call to browser within it: plus = function(a, b) {browser(); a + b} A plain vanilla call

[R] ggplot: vertical text annotation, outside plot region

2014-04-10 Thread Rguy
In traditional R graphics I can generate text annotations that are vertical, and that lie outside the plot region, using the mtext function. I'd like to do the same thing in ggplot2. Is it possible? The documentation for 'annotate' does not mention such possibilities. Thanks.

[R] identical applied to data frames

2014-04-06 Thread Rguy
I have two data frames that I believe are identical, yet checking them with identical() fails. Each data frame has two columns named 'pk' and 'newv_f13__bool'. As shown below, the columns of the data frames are identical, according to the identical() function, yet the data frames themselves are

[R] remove failure

2013-09-01 Thread Rguy
Platform: Windows 7, R version 3.0.1 Patched (2013-06-19 r62992) I have been running the following code (part of a larger program) for many months without problem: if ((gname %in% ls(envir=.GlobalEnv)) !is.null(cols)) { if (!identical(cols, names(get(gname, envir=.GlobalEnv remove(gname,

[R] Accidentally replacing core R functions

2013-08-03 Thread Rguy
I sometimes find that a function I have defined has the same name as an R core function. In most cases I have no desire to redefine the core R function and would prefer to give my function a different name. The problem is that R lets users redefine its core functions without any warning. Is there

[R] Parallel processing random 'save' error

2013-07-01 Thread Rguy
Platform: Windows 7 Package: parallel Function: parLapply I am running a lengthy program with 8 parallel processes running in main memory. The processes save data using the 'save' function, to distinct files so that no conflicts writing to the same file are possible. I have been getting errors

[R] Time of day

2013-06-25 Thread Rguy
Is there a simple way to obtain the time of day in R? I want the time of day for computational purposes, not for display. I want to be able to create code like the following: if (time_of_day = 22:00 time_of_day = 06:00) then X otherwise Y I realize I could parse a date/time object and extract

[R] boot, what am I doing wrong?

2013-06-07 Thread Rguy
I am getting started with the boot package and boot command. As a first step I tried the following. Something is wrong, but i can't see what. Any advice would be much appreciated. x = runif(10) mean(x) [1] 0.467626212374307 boot(x, mean, R=100) Error in mean.default(data, original, ...) :