Re: [R] gsub: replacing slashes in a string

2016-09-14 Thread Joe Ceradini
Thanks Jim! Joe On Wed, Sep 14, 2016 at 11:06 AM, jim holtman wrote: > try this: > > > gsub("", "/", test) > [1] "8/24/2016" "8/24/2016" "6/16/2016" "6/16/2016" > > > > > Jim Holtman > Data Munger Guru > > What is the problem that you are trying to solve? > Tell me what you want to do, not

Re: [R] gsub: replacing slashes in a string

2016-09-14 Thread jim holtman
try this: > gsub("", "/", test) [1] "8/24/2016" "8/24/2016" "6/16/2016" "6/16/2016" Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Wed, Sep 14, 2016 at 12:25 PM, Joe Ceradini wrote: > Hi all, > >

Re: [R] gsub: replacing slashes in a string

2016-09-14 Thread Joe Ceradini
ent of Anthropology > Texas A&M University > College Station, TX 77840-4352 > > > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Joe > Ceradini > Sent: Wednesday, September 14, 2016 11:25 AM > To: Zilefac > Subject: [R

Re: [R] gsub: replacing slashes in a string

2016-09-14 Thread David L Carlson
016" "2","8/24/2016" "3","6/16/2016" "4","6/16/2016" - David L Carlson Department of Anthropology Texas A&M University College Station, TX 77840-4352 -----Original Message----- From: R-help [

Re: [R] gsub: replacing slashes in a string

2016-09-14 Thread ruipbarradas
Hello, I failing to understand the problem, isn't the following what you want? (test2 <- gsub("\\", "/", test, fixed = TRUE)) [1] "8/24/2016" "8/24/2016" "6/16/2016" "6/16/2016" Hope this helps, Rui Barradas Citando Joe Ceradini : Hi all, There are many R help posts out there dealing with

[R] gsub: replacing slashes in a string

2016-09-14 Thread Joe Ceradini
Hi all, There are many R help posts out there dealing with slashes in gsub. I understand slashes are "escape characters" and thus need to be treated differently, and display differently in R. However, I'm still stuck on find-replace problem, and would appreciate any tips. Thanks! GOAL: replace al