[Rd] Error generated by .Internal(nchar) disappears when debugging

Joris Meys jorismeys at gmail.com
Mon Oct 5 16:22:08 CEST 2015


Hi all,

I have a puzzling problem related to nchar. In R 3.2.1, the internal nchar
gained an extra argument (see
https://stat.ethz.ch/pipermail/r-announce/2015/000586.html)

I've been testing code using the package copula, and at home I'm still
running R 3.2.0 (I know, I know...). When trying the following code, I got
an error:

> library(copula)
> fgmCopula(0.8)
Error in substr(sc[i], 2, nchar(sc[i]) - 1) :
  4 arguments passed to .Internal(nchar) which requires 3

So I do the obvious and try to debug using debug():

> debugonce(fgmCopula)
> fgmCopula(0.8)

And when I try that, I can step through the complete function without any
error. I know that the obvious solution is to update to R 3.2.2, but :

- I have absolutely no clue how a function can give an error when used
normally, but not return any error when stepping through it using debug.
- The copula package built for R 3.2.2 isn't compatible any longer with R
versions older than R 3.2.1, like the one used in our PC classes. Other
packages might share the same problem.

Can somebody shed some light on what exactly is going on here? I don't want
to bug the authors of the copula package if I'm not sure of the origin of
this problem.

Cheers
Joris
-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics

tel :  +32 (0)9 264 61 79
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]



More information about the R-devel mailing list