Displaying 20 results from an estimated 9000 matches similar to: "Removing backslashes from data"
2020 May 15
3
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) {
2009 Apr 22
1
Upgrading from 1.4.21.2 to 1.6.0.5 breaks sql queries with backslashes?
Hi, all. I've been searching google, bug reports and forums and have
looked in all the asterisk-users list archives back to 2003 but haven't
seen an answer to this, so thought I'd post here.
The problem seems to be that Asterisk 1.6.0.5 is sending backslashes
(needed to escape commas and so forth in 1.4.21.2) as
*literal* backslashes to Mysql, so that Mysql gives a syntax error
2012 Mar 07
1
gsub: replacing double backslashes with single backslash
Hello everybody,
this might be a trivial question, but I have been unable to find this using
Google. I am trying to replace double backslashes with single backslashes using
gsub. There seems to be some unexpected behaviour with regards to the
replacement string "\\". The following example uses the string C:\\ which should
be converted to C:\ .
> gsub("\\\\",
2009 Jun 26
1
should Sys.glob() cope with a UNC windows path beginning with backslashes?
I find that Sys.glob() doesn't like UNC paths where the initial slashes are backslashes. The help page for Sys.glob() doesn't specificly mention UNC paths, but does say: "File paths in Windows are interpreted with separator \ or /." Is the failure to treat a path beginning with a double-backslash as a UNC network drive path the intended behavior?
E.g., on a Windows system
2008 May 09
4
Gnome-terminal's backslashes look like Ws with a horizontal line through -- how to get a backslash?
Hello!
I've just started trying gnome-terminal (instead of xterm) because of
its "tabbing" facility. However, I note that with it backslashes appear
something like a W with a horizontal line through it. Any known way to
get a backslash to appear as a backslash?
To see what I mean, use gnome-terminal with
echo '\'
in bash, ksh, etc.
Regards,
Chip Campbell
2004 Nov 30
3
Problem with print() and backslashes.
Dear R List
I have a small problem concerning the output of print().
My version:
> R.version
_
platform i386-portbld-freebsd5.2
arch i386
os freebsd5.2
system i386, freebsd5.2
status
major 1
minor 9.0
year 2004
month 04
day 12
language R
Consider this: I want to print a backslash with an exclamation mark. Here
is the output.
> print( "\!"
2006 Apr 24
3
gsub + backslashes
Dear developeRs,
I thought that backslashes can be escaped in the usual way (and I think I
did this before) but I can't see why
R> gsub("\\", "x", "\alpha")
Error in gsub(pattern, replacement, x, ignore.case, extended, fixed,
useBytes) :
invalid regular expression '\'
gives an error. Or am I just blind?
Best,
Torsten
R> version
2006 Jan 04
7
Replacing backslashes with slashes
Hello,
I've seen this question asked in the archives but no clear reply or solution
provided. So, just to be sure it is not possible in R: Can I replace
backslashes with slashes in a string ?
I am writing a GUI for R with the Rpad library. I have a "browse" button for
data loading and Windows return a path string with backslashes. I need to
convert them into slashes to use the
2008 Jul 02
1
Data editor duplicates pairs of backslashes (PR#11897)
Full_Name: Magnus Torfason
Version: 2.7.0
OS: Windows Vista
Submission from: (NULL) (128.59.140.167)
Each time a string is edited in the data editor (on Windows at least), any pairs
of backslashes (an escaped backslash) are duplicated on each edit of the string.
Note that one must actually double click the value for the bug to show up.
Behavior/Replication:
> # Create data frame
>
2009 Feb 06
3
Sweave and backslashes
Hello Everyone,
I am an avid Sweave user and I am trying to pretty print floating point
numbers for latex output. For example in my document, I would like:
4.2\cdot 10^-{8}
Instead of:
4.2e-08
The Hmisc package has a nice function for doing this- but Hmisc has a ton of
dependencies and has proved very unportable to the various machines I work
on. So, I set out to write my own function that
2009 Aug 11
1
Awkward escaping with five backslashes within \code{ } in new parse_Rd
Hi R-devels,
I noticed that you are working quite actively on the new Rd-parser
and have made it the default renderer in R-2.10.0dev. So I would
like to come back on an issue I have already raised on this list
last November
("Two minor escaping issues using \preformatted{....} in Rd format")
My setting has slightly changed as \preformatted, AFAICS is not
supported within \describe
2011 Aug 11
2
UNC windows path beginning with backslashes: normalizePath bug??
Hi,
Back in June I posted the message below, but had no replies. I've made a
little progress since then so this is to update anyone interested (!) and to
ask for comments.
Brief problem statement:
Under Windows, some parts of R don't handle UNC paths beginning with
backslashes. Specifically
a) Sys.glob() fails to find some files breaking (e.g.) Rcmdr plugins
2001 Nov 01
3
Lost backslashes in parse()
I'm comparing R-1.3.0 on Solaris 2.6 to R-1.3.1 on WindowsNT. The following
5-line script returns TRUE on Unix but FALSE on NT:
fnam <- tempfile()
file.create(fnam)
txt <- paste("file.exists(\"", fnam, "\")", sep="")
expr <- parse(text=txt)
eval(expr)
The issue seems to be that backslashes get lost in the parsing. A workaround
is to change
2006 Jan 05
1
How do I get sub to insert a single backslash?
Something about the way R processes backslashes is defeating me.
Perhaps this is because I have only just started using R for text processing.
I would like to change occurrences of the ampersand & into ampersand
preceded by a backslash.
> temp <- "R & D"
> sub("&", "\&", temp)
[1] "R & D"
> sub("&",
2011 Aug 30
2
url prep function (backslash issue)
Greeting R
Community,
I am a
windows user so this problem may be specific to windows. I often want to source
files from within R
such as:
C:\Users\Rinker\Desktop\Research & Law\Data\School Data 09-10. To source
this file I need to go
through the
path and replace all the backslashes (\) with forward slashes (/). I usually do
this in MS Word
using the
replace option, however, I'd like
2006 Jan 04
1
AMP: Losing backslash characters in config files
I've just started using AMP and found that I have a problem with escaped characters in config files.
In particular, I have a custom config item that needs a semicolon in...
SetVar(_ALERT_INFO=info=auto-answer;delay=1)
To get the part of the line after the ; to be accepted by Asterisk as a non-comment it needs to be escaped with a backslash, but I have found that I need to put two
2003 Aug 12
3
grep and gsub on backslash and quotes
The following code works, to gsub single quotes to double quotes:
line <- gsub("'", '"', line)
(that's a single quote within doubles then a double within singles if
your
viewer's font is not good).
But The R Language Manual tells me that
Quotes and other special characters within strings
are specified using escape sequences:
\' single quote
\"
2020 May 15
0
edit() doubles backslashes when keep.source=TRUE
I can confirm this changed behaviour. I just compared R-3.6.3 with
yesterday's R-devel. Using R-devel, the tempfile opened by the editor
(Emacs for me, but shouldn't matter) contains doubled backslashes.
This could be related to
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=17800
Best regards,
Sebastian
Am 15.05.20 um 03:50 schrieb William Dunlap via R-devel:
> Is it just
2010 Jun 16
2
Backslash in paste() function
Hi,
I'm trying to build a vector of latex commands. However, I need the command strings to begin with a backslash "\". I have:
test <- c('foo','bar')
and I need to rebuild the array, encapsulating the text items with latex stuff, like this:
paste("\parbox[b]{3cm}{", test, "}", fill=TRUE)
Actually, cat() prints the string fine if one uses
2008 Aug 04
3
backslash in character string?
Dear list,
After searching many old posts, I can't find the solution to a simple problem.
can someone tell me how to create a character string with multiple backslashes, as in:
file_dir <- c("C:\files\data\")
I need to create this string and then paste it to many files names for batch processing in another software program. R won't accept the backslash and removes