Skip to content
Back to formatted view

Raw Message

Message-ID: <CAF8bMcaGMe6msdo=WLQCD27gyjsw5g6_O32tG7S-Du+DiB4zVw@mail.gmail.com>
Date: 2020-05-15T01:50:37Z
From: William Dunlap
Subject: edit() doubles backslashes when keep.source=TRUE

Is it just my installation or does edit() (or fix(), etc.) in R-4.0.0
double all the backslashes when options(keep.source=TRUE)?  E.g.,

> options(keep.source=TRUE)
> f <- function(x) { cat("\t", x, "\n", sep="") }
> edit(f) # exit the editor without making any changes
The editor (vi or notepad) shows doubled backslashes
    function(x) { cat("\\t", x, "\\n", sep="") }
as does the return value of edit().

If I set options(keep.source=FALSE) before defining 'f' or remove t's
'srcref' attribute then the backslashes are left alone.

Bill Dunlap
TIBCO Software
wdunlap tibco.com

	[[alternative HTML version deleted]]