Re: [R] Using Sub

2012-06-19 Thread Phil Hurvitz
Possibly overkill, I use a Windows batch file that calls a perl script. Both the bat and pl files need to be in the executable path. Open a command prompt, type `pwd ' and then drag the file or folder from the Windows Explorer to the cmd. The script will return the file with backslashes convert

Re: [R] Using Sub

2012-06-18 Thread arun
ub('', '/',str) [1] "G:/CompensationAudits_Reports/StepAudit/StepsoffStep.accdb" A.K. - Original Message - From: "Lopez, Dan" To: arun Cc: R help Sent: Monday, June 18, 2012 12:03 PM Subject: RE: [R] Using Sub Hi A.K., That works but when I copy and

Re: [R] Using Sub

2012-06-18 Thread arun
--- From: "Lopez, Dan" To: Duncan Murdoch Cc: R help Sent: Monday, June 18, 2012 10:37 AM Subject: Re: [R] Using Sub Hi Duncan, That's right but I want to be able to use this to replace back slashes with front slashes when I copy and paste file paths. How can I make this work

Re: [R] Using Sub

2012-06-18 Thread Lopez, Dan
Jeff - Thanks. I think I'll just stick to using file.choose(). Dan -Original Message- From: Jeff Newmiller [mailto:jdnew...@dcn.davis.ca.us] Sent: Monday, June 18, 2012 10:29 AM To: Lopez, Dan; arun Cc: R help Subject: Re: [R] Using Sub Please study how escapes work

Re: [R] Using Sub

2012-06-18 Thread William Dunlap
inal Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf > Of Jeff Newmiller > Sent: Monday, June 18, 2012 10:29 AM > To: Daniel Lopez; arun > Cc: R help > Subject: Re: [R] Using Sub > > Please study how escapes work.

Re: [R] Using Sub

2012-06-18 Thread Jeff Newmiller
I would end up >passing. > >Do you have any other suggestions or methods to accomplish this? > >Thanks. >Dan > > >-Original Message- >From: arun [mailto:smartpink...@yahoo.com] >Sent: Monday, June 18, 2012 8:59 AM >To: Lopez, Dan >Cc: R help

Re: [R] Using Sub

2012-06-18 Thread Lopez, Dan
? Thanks. Dan -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Monday, June 18, 2012 8:59 AM To: Lopez, Dan Cc: R help Subject: Re: [R] Using Sub Hi, I guess you need something like this: > str1<-"G:\\Compensation Audits_Reports\\Step Audit\\Steps off

Re: [R] Using Sub

2012-06-18 Thread Lopez, Dan
com] Sent: Friday, June 15, 2012 12:04 AM To: Lopez, Dan Cc: R help Subject: Re: [R] Using Sub On 12-06-14 6:23 PM, Lopez, Dan wrote: > Hi, > > I have been trying to get the sub function to work but can't for the life of > me figure it out. I tried looking at ?sub but I think there is

Re: [R] Using Sub

2012-06-15 Thread Rui Barradas
Hello, See inline. Em 15-06-2012 08:03, Duncan Murdoch escreveu: On 12-06-14 6:23 PM, Lopez, Dan wrote: Hi, I have been trying to get the sub function to work but can't for the life of me figure it out. I tried looking at ?sub but I think there is something that I am just not understanding.

Re: [R] Using Sub

2012-06-15 Thread Duncan Murdoch
On 12-06-14 6:23 PM, Lopez, Dan wrote: Hi, I have been trying to get the sub function to work but can't for the life of me figure it out. I tried looking at ?sub but I think there is something that I am just not understanding. Example failed attempts sub("\\","/","G:\Compensation Audits_Repo

[R] Using Sub

2012-06-14 Thread Lopez, Dan
Hi, I have been trying to get the sub function to work but can't for the life of me figure it out. I tried looking at ?sub but I think there is something that I am just not understanding. Example failed attempts > sub("\\","/","G:\Compensation Audits_Reports\Step Audit\Steps off Step.accdb") E

Re: [R] Using sub to get captions in barplots

2008-09-30 Thread Richard . Cotton
> I've been using "sub" (subtitle) instead of "main" such that captions are > below figures produced by xyplot. This works fine and captions are on a > single line. However, when I try this for bar plots with error bars > (altering the error.bars function form Crawley's The R Book, see below),

[R] Using sub to get captions in barplots

2008-09-30 Thread David Afshartous
All, I've been using "sub" (subtitle) instead of "main" such that captions are below figures produced by xyplot. This works fine and captions are on a single line. However, when I try this for bar plots with error bars (altering the error.bars function form Crawley's The R Book, see below), the

Re: [R] using sub with "wildcards", e.g. sub("\\*..", "", "test.a..34")

2008-01-08 Thread jim holtman
This will work: > sub(".*\\.\\.", "", "test.a..34") [1] "34" This say match all characters upto and including the two periods. You have to escape the periods since they have special meaning in regular expression (match a character). On Jan 8, 2008 6:08 PM, Charilaos Skiadas <[EMAIL PROTECTED]>

Re: [R] using sub with "wildcards", e.g. sub("\\*..", "", "test.a..34")

2008-01-08 Thread Charilaos Skiadas
If this is really the case you are dealing with, wouldn't strsplit do the job more easily? On Jan 8, 2008, at 5:47 PM, Thomas Pujol wrote: > I have a text string "test.a..34" > > I wish to extract the text that comes after ".." (e.g. "34"), and > the text that comes before ".." (e.g. "test.

[R] using sub with "wildcards", e.g. sub("\\*..", "", "test.a..34")

2008-01-08 Thread Thomas Pujol
I have a text string "test.a..34" I wish to extract the text that comes after ".." (e.g. "34"), and the text that comes before ".." (e.g. "test.a"). What is a good way to do this? Also, can you help me understand how to use "wildcards" such as "*" with sub, etc? #This seems