Re: [Rd] Inconsistency in handling of numeric input with %d by sprintf

2017-05-23 Thread Evan Cortens
c(NA,1))) >>> Error in sprintf("%d", as.numeric(c(NA, 1))) : >>> invalid format '%d'; use format %f, %e, %g or %a for numeric objects >>> > sprintf("%d", as.numeric(c(1,NA))) >>> [1] "1" "NA" >>&

Re: [Rd] Inconsistency in handling of numeric input with %d by sprintf

2017-05-23 Thread Evan Cortens
%g or %a for numeric object > > > > I understand the error is correct, but if it works for other numeric input, > why doesn't R just coerce NA_real_ to NA_integer_? > > Michael Chirico > > [[alternative HTML version deleted]] > > _

[Rd] Possible issue with coercion in sprintf()?

2017-03-09 Thread Evan Cortens
ss a vector of reals with a format of "%d", it simply gives you an error, telling you to "use format %f, %e, %g or %a for numeric objects". Yet another possibility is to have some special treatment for NA's, where it would check the first non-NA element in the vector rather

Re: [Rd] problem with normalizePath()

2016-11-30 Thread Evan Cortens
-MikeL.xls", 2) # > works > > -Original Message- > From: Martin Maechler [mailto:maech...@stat.math.ethz.ch] > Sent: Friday, November 18, 2016 3:37 PM > To: Evan Cortens > Cc: Laviolette, Michael; r-devel@r-project.org > Subject: Re: [Rd] problem with normaliz

Re: [Rd] problem with normalizePath()

2016-11-17 Thread Evan Cortens
name of the share? -- Evan Cortens, PhD Institutional Analyst - Office of Institutional Analysis Mount Royal University 403-440-6529 On Thu, Nov 17, 2016 at 2:28 PM, Laviolette, Michael < michael.laviole...@dhhs.nh.gov> wrote: > The packages "readxl" and "haven" (and

Re: [Rd] Recursive dir.create() on Windows shares

2016-09-27 Thread Evan Cortens
to say I believe the correct behaviour is to skip the first two parts of a path beginning with \\ before attempting to create a directory in a call to dir.create() with recursive = TRUE. On Mon, Sep 26, 2016 at 3:46 PM, Duncan Murdoch wrote: > On 26/09/2016 5:27 PM, Evan Cortens wrote: &

[Rd] Recursive dir.create() on Windows shares

2016-09-26 Thread Evan Cortens
;t have been a bug since then. Yet I can't find any indication that the UNC naming convention has changed, and I can't find any way that will let you test the pathname to see if it's "\\server\share" or "\\share". I've also filed this on bugzilla,