Re: [Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-22 Thread Robert McGehee
oblem disappear for me in all cases. However, the odd output I encountered along the way seemed worthy of comment. HTH, Robert -Original Message- From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] Sent: Friday, March 22, 2019 5:11 AM To: Robert McGehee Cc: r-devel@r-p

[Rd] prettyNum digits=0 not compatible with scientific notation

2019-03-21 Thread Robert McGehee
R developers, Seems I get a bad result ("%#4.0-1e" in particular) when trying to use prettyNum digits=0 with scientific notation. I tried on both my Linux box and on an online R evaluator and saw the same problem, so it's not limited to my box at least. I see the problem in both R 3.5.3 and R

Re: [Rd] as.character(list(NA))

2018-01-22 Thread Robert McGehee
Also perhaps a surprise that the behavior depends on the mode of the NA. > is.na(as.character(list(NA_real_))) [1] FALSE > is.na(as.character(list(NA_character_))) [1] TRUE Does this mean deparse() preserves NA-ness for NA_character_ but not NA_real_? -Original Message- From: R-devel

Re: [Rd] 'gsub' not perl compatible?

2017-07-24 Thread Robert McGehee
Hi Jean-Luc, FWIW, you're pointing out a common discrepancy between regex parsers, which is whether or not a regex parser advances after finding both a zero-length match and a non-zero-length match. I think this article is especially helpful for understanding the nuances here, particularly the

Re: [Rd] 'ordered' destroyed to 'factor'

2017-06-16 Thread Robert McGehee
Hi, It's been my experience that when you combine or aggregate vectors of factors using a function, you should be prepared for surprises, as it's not obvious what the "right" way to combine factors is (ordered or not), especially if two vectors of factors have different levels or (if ordered)

[Rd] Allow dot in RHS of update.formula's old formula

2017-05-23 Thread Robert McGehee
Feature request: I want to use update.formula to subtract an intercept (or other) term from a formula with a dot on the RHS. However, as this causes an error, I propose a patch below. Thus, I want: > update.formula(y ~ ., ~ . -1) [1] y ~ . - 1 Instead I get this error: Error in

Re: [Rd] Very hard to reproduce bug (?) in R-devel

2017-04-05 Thread Robert McGehee
Winston, I had a similar experience to you tracking down an insanely difficult bug in my R code that "disappeared" whenever slight changes were made to the script (e.g. like adding cat() statements). In my case, it coincided with my over-eager compilation of R and its library stack, as I was

Re: [Rd] non-infectious license for R package?

2017-03-24 Thread Robert McGehee
I have no direct experience in this regard, but this FAQ seems to answer your question. https://www.gnu.org/licenses/gpl-faq.en.html#IfInterpreterIsGPL I read this to mean that the answer may be different depending on whether your code links against R libraries or simply uses R as an

Re: [Rd] Matrix package breaks as.matrix method

2017-01-30 Thread Robert McGehee
oshnakov [mailto:georgi.boshna...@manchester.ac.uk] Sent: Sunday, January 29, 2017 1:40 PM To: r-devel@r-project.org Cc: Robert McGehee <rmcge...@walleyetrading.net> Subject: RE: R-devel Digest, Vol 167, Issue 25 Hi, Short answer: import 'as.matrix' and export your method(s) for it. From W

[Rd] Matrix package breaks as.matrix method

2017-01-27 Thread Robert McGehee
Hi, The Matrix package and the as.matrix method do not seem to be compatible inside of a package. Here's an example. I've created a simple package "mat" that defines an eponymous class and as.matrix method on that class. All is well, unless that package has the Matrix package in its Depends or

[Rd] S4 object does not commute? (PR#13209)

2008-10-27 Thread Robert . McGehee
Hello all, It appears that for the simplest of S4 objects, z+1 does not equal 1+z. Presumably this is a bug, as 1+z seems to make a malformed object (at least malformed as an input to str). Thanks, Robert setClass(test, representation(vector)) [1] test z - new(test, 1) identical(z+1, 1+z) [1]

[Rd] sapply(Date, is.numeric) (PR#12008)

2008-08-07 Thread robert . mcgehee
Full_Name: Robert McGehee Version: 2.7.1 OS: Windows Submission from: (NULL) (192.223.226.6) R-developers, The results below seem inconsistent. From the documentation for is.numeric, I expect FALSE in both cases. x - data.frame(dt=Sys.Date()) is.numeric(x$dt) [1] FALSE sapply(x, is.numeric

[Rd] sapply(Date, is.numeric) (PR#11982)

2008-08-07 Thread Robert . McGehee
, Robert McGehee, CFA Geode Capital Management, LLC One Post Office Square, 28th Floor | Boston, MA | 02109 Tel: 617/392-8396Fax:617/476-6389 mailto:[EMAIL PROTECTED] This e-mail, and any attachments hereto, are intended fo...{{dropped:13}} __ R

[Rd] sapply(Date, is.numeric) (PR#12221)

2008-08-07 Thread Robert . McGehee
month 04 =20 day22 =20 svn rev45424 =20 language R =20 version.string R version 2.7.0 (2008-04-22) Thanks, Robert McGehee, CFA Geode Capital Management, LLC One Post Office

[Rd] seq.Date not accepting NULL length.out (PR#9239)

2006-09-20 Thread Robert . McGehee
Robert McGehee Quantitative Analyst Geode Capital Management, LLC 53 State Street, 5th Floor | Boston, MA | 02109 Tel: 617/392-8396Fax:617/476-6389 mailto:[EMAIL PROTECTED] This e-mail, and any attachments hereto, are intended for us...{{dropped

[Rd] Bug in title() crashes R (PR#9115)

2006-07-31 Thread Robert . McGehee
=20 version.string Version 2.3.1 (2006-06-01) Robert McGehee Quantitative Analyst Geode Capital Management, LLC 53 State Street, 5th Floor | Boston, MA | 02109 Tel: 617/392-8396Fax:617/476-6389 mailto:[EMAIL PROTECTED] This e-mail, and any attachments hereto, are intended

[Rd] Typo in getAllMethods() (PR#8848)

2006-05-10 Thread Robert . McGehee
=20 month 04 =20 day24 =20 svn rev37909=20 language R=20 version.string Version 2.3.0 (2006-04-24) Robert McGehee Quantitative Analyst Geode Capital Management, LLC 53

[Rd] read.table error upon package installation (PR#8230)

2005-10-20 Thread Robert . McGehee
Upon upgrading to R 2.2.0 on my Windows box, I found that one of my packages no longer compiled, giving this error: Error in read.table(zfile, header =3D TRUE) : more columns than column names Execution halted After removing every line of code from my package and still not being able to