[Rd] zapsmall(x) for scalar x

2023-12-16 Thread Gregory Warnes
I was quite suprised to discover that applying `zapsmall` to a scalar value has no apparent effect. For example: > y <- 2.220446e-16 > zapsmall(y,) [1] 2.2204e-16 I was expecting zapsmall(x)` to act like > round(y, digits=getOption('digits')) [1] 0 Looking at the current source code, indicat

Re: [Rd] [External] Re: 1954 from NA

2021-05-25 Thread Gregory Warnes
As a side note, for floating point values, the IEEE 754 standard provides for a large set of NaN values, making it possible to have multiple types of NAs for floating point values... Sent from my iPad > On May 25, 2021, at 3:03 PM, Avi Gross via R-devel > wrote: > > That helps get more unde

Re: [Rd] the pipe |> and line breaks in pipelines

2020-12-09 Thread Gregory Warnes
Many languages allow a final backslash (“\”) character to allow an expression to span multiple lines, and I’ve often wished for this in R, particularly to allow me to put `else` on a separate line at the top-level. It would also allow alignment of infix operators like the new pipe operator `|>` at

Re: [Rd] anonymous functions

2020-12-07 Thread Gregory Warnes
Thanks for expressing this eloquently. I heartily agree. On Mon, Dec 7, 2020 at 12:04 PM Therneau, Terry M., Ph.D. via R-devel < r-devel@r-project.org> wrote: > “The shorthand form \(x) x + 1 is parsed as function(x) x + 1. It may be > helpful in making > code containing simple function expressio

Re: [Rd] [External] Re: New pipe operator

2020-12-07 Thread Gregory Warnes
My vote is for the consistency of function calls always having parentheses, including in pipes. Making them optional only saves two keystrokes, but will add yet another inconsistency to confuse or trip folks up. As for the new anonymous function syntax, I would prefer something more human friendl

Re: [Rd] New pipe operator

2020-12-05 Thread Gregory Warnes
If we’re being mathematically pedantic, the “pipe” operator is actually function composition. That being said, pipes are a simple and well-known idiom. While being less than mathematically exact, it seems a reasonable label for the (very useful) behavior. On Sat, Dec 5, 2020 at 9:43 PM Abby Spu

Re: [Rd] .Internal(quit(...)): system call failed: Cannot allocate memory

2020-11-23 Thread Gregory Warnes
Try explicitly deleting large data objects by calling `rm`, then `gc`. On Mon, Nov 23, 2020 at 6:15 AM Tomas Kalibera wrote: > On 11/21/20 6:51 PM, Jan Gorecki wrote: > > Dear R-developers, > > > > Some of the more fat scripts (50+ GB mem used by R) that I am running, > > when they finish they

Re: [Rd] status of Java & rJava?

2020-03-28 Thread Gregory Warnes
Hi Spencer, I'm also having problems getting rJava to work on Mac OS X. -G On Sat, Mar 28, 2020 at 4:19 PM Spencer Graves wrote: > Hello, All: > > >Is Java being deprecated for R? > > >I ask, because I've been unable to get rJava 0.9-11 to work under > either macOS 10.15 or Wind

Re: [Rd] (no) circular dependency

2016-04-08 Thread Gregory Warnes
A third possibility, which I use in my gtools and gdata packages, is to use soft-links to create a copy of the relevant functions from one package in the other. I make sure these functions are *not* exported, so no conflicts are created, and the use of soft-links mean the code never gets out of

[Rd] Add first() and last() to utils?

2015-04-28 Thread Gregory Warnes
Hi all, I've been using first() and last() for some time instead of x[1] and x[length(x)] for vectors, and I gradually added methods for lists, matrices, and data.frames. In preparing the next release of the 'gdata' package (2.16.1) I settled on these definitions, which harness the existing metho

Re: [Rd] Interactiveness

2007-12-11 Thread Gregory Warnes
You might also find many of the tools provided in the 'session' package helpful for interacting with R in this way. 'session' package description: Utility functions for interacting with R processes from external programs. This package includes functions to save and restore session informat

Re: [Rd] errors in loading packages (PR#9839)

2007-08-10 Thread Gregory Warnes
Another way of answering the question: The gmodels and gregmisc package both depend on the gtools package. Either install that first, or tell R to install all dependencies. From the command line: install.packages(..., depends=TRUE) or the equivalent checkbox in the UI. -G On Aug

Re: [Rd] [Rpy] error in building rpy in linux power-pc[sec=unclassified]

2007-06-23 Thread Gregory Warnes
Hello Mohar, This question is outside of the RPy scope. It looks like the type of question that should be posed to the R-devel mailing list: [EMAIL PROTECTED] -Greg On Jun 20, 2007, at 8:25PM , Mohar Chattopadhyay wrote: > Dear all, > > I have encountered errors in compiling R-2.5.

Re: [Rd] [R] Error loading libraries in MAC

2007-04-18 Thread Gregory Warnes
I have received a number of reports of problems with recent unversal Mac packages from CRAN when used with R 2.4.1. Has something in the build script changed? -G On Apr 18, 2007, at 4:49PM , Mayte Suarez-Farinas wrote: > Hi I just installed the gmodels package > and the installation was su

Re: [Rd] FW: Bug in sum() with named data frame arguments

2005-12-12 Thread Gregory Warnes
I got an email error message when I attempted to send this from my work account. I have manually added it to the bug tracker, and am resending from my personal account. -G On 12/12/05, Warnes, Gregory R <[EMAIL PROTECTED]> wrote: > > > > > -Original Message- > > From: Warnes, Gr