Project

General

Profile

Actions

Bug #4270

closed

RExpression exports special characters in strings as the 2 character escaped sequence

Added by Oliver Soong almost 15 years ago. Updated almost 15 years ago.

Status:
Resolved
Priority:
Normal
Category:
actors
Target version:
Start date:
07/27/2009
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:
4270

Description

Let's say I want to export the string "alpha", including the double quotes, on the port a from an RExpression actor. The R code is:
a <- "\"alpha\""
nchar(a) (string length) indicates 7 characters as expected.
cat(a, "\n", sep = "") displays as expected.
Exporting strings is filtered through dput, which escapes special characters, so the output string contains the 2 character escape sequence \". If I pass the output port to an Expression actor with an input port named input and evaluate the expression input.length, I get 9. Similar problems occur for \n and \t and presumably other characters I'm not thinking of at the moment.

Actions

Also available in: Atom PDF