Hi, The warning that was recently added to R-devel about unrecognized escapes has been very helpful in identifying a number of incorrectly specified regular expressions. We are, however, seeing warning messages for Rd files that contiain '\_' and I think that _is_ a recognized escape. Can the check be refined so that '\_' is not warned about in Rd files? + seth
Warnings about unrecognized escapes in Rd
5 messages · Peter Dalgaard, Seth Falcon, Brian Ripley
Seth Falcon <sfalcon at fhcrc.org> writes:
Hi, The warning that was recently added to R-devel about unrecognized escapes has been very helpful in identifying a number of incorrectly specified regular expressions. We are, however, seeing warning messages for Rd files that contiain '\_' and I think that _is_ a recognized escape. Can the check be refined so that '\_' is not warned about in Rd files?
Er, do you have a minimal example showing the behaviour? It's not quite clear whether you have this happening everywhere or only in example sections, formulas or...?
O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Peter Dalgaard <p.dalgaard at biostat.ku.dk> writes:
Er, do you have a minimal example showing the behaviour? It's not quite clear whether you have this happening everywhere or only in example sections, formulas or...?
Oups. The example I was looking at has \_ in a number of places in the Rd files so perhaps the warning is correct (in which case, my apologies for the noise). I'll look into it further. Of course it would be easier to detect this if the warning message gave more information about where the problem was encountered ;-) + seth
Seth Falcon <sfalcon at fhcrc.org> writes:
Peter Dalgaard <p.dalgaard at biostat.ku.dk> writes:
Er, do you have a minimal example showing the behaviour? It's not quite clear whether you have this happening everywhere or only in example sections, formulas or...?
Oups. The example I was looking at has \_ in a number of places in the Rd files so perhaps the warning is correct (in which case, my apologies for the noise). I'll look into it further. Of course it would be easier to detect this if the warning message gave more information about where the problem was encountered ;-)
Just to complete the thread: I was wrong, R was warning about unrecognized escape sequences in example and usage sections, not documentation text. Sorry for the noise. + seth
On Wed, 18 Oct 2006, Seth Falcon wrote:
Seth Falcon <sfalcon at fhcrc.org> writes:
Peter Dalgaard <p.dalgaard at biostat.ku.dk> writes:
Er, do you have a minimal example showing the behaviour? It's not quite clear whether you have this happening everywhere or only in example sections, formulas or...?
Oups. The example I was looking at has \_ in a number of places in the Rd files so perhaps the warning is correct (in which case, my apologies for the noise). I'll look into it further. Of course it would be easier to detect this if the warning message gave more information about where the problem was encountered ;-)
Just to complete the thread: I was wrong, R was warning about unrecognized escape sequences in example and usage sections, not documentation text.
This warning comes from the parser, and only when parsing quoted strings. That is why it is hard to give any more information about where the error is: the parser does not know much about where in the input it is. (You can't even easily give the current string as you are in the middle of parsing it: I am working on that one.)
Sorry for the noise. + seth
______________________________________________ R-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595