O yaa... Thank you so much...

 

________________________________

From: jim holtman [mailto:jholtman@gmail.com] 
Sent: Saturday, December 02, 2006 5:58 PM
To: Shubha Vishwanath Karanth
Subject: Re: [R] Fwd: Urgent Help in Paste Command

 

It is fine since '\' is used to escape characters (like ' and "), it
prints as '\\' escaping itself.
 

> x <- '\\'  # need to escape 'escape'
> x
[1] "\\"
> cat(x)
\> 
 

 

For use in path names, use '/'; usable on Windows and other systems:

 

fileName <- 'C:/Program Files/R/R-2.4.0/bin/Rgui.exe'
 

On 12/2/06, Shubha Vishwanath Karanth <shubhak@ambaresearch.com> wrote: 

But when I do this I need x value to be " C:\Program
Files\R\R-2.4.0\bin\Rgui.exe" and not C:\\Program 
Files\\R\\R-2.4.0\\bin\\Rgui.exe"

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto: r-help-bounces@stat.math.ethz.ch
<mailto:r-help-bounces@stat.math.ethz.ch> ] On Behalf Of Gabor
Grothendieck
Sent: Saturday, December 02, 2006 5:21 PM
To: Shubha Karanth
Cc: r-help@stat.math.ethz.ch
Subject: Re: [R] Fwd: Urgent Help in Paste Command

Try this:

> x <- readline()
C:\Program Files\R\R-2.4.0\bin\Rgui.exe
> x
[1] "C:\\Program Files\\R\\R-2.4.0\\bin\\Rgui.exe"



You can also use

  readLines("clipboard")

if you are trying to read in something from the clipboard.


On 12/2/06, Shubha Karanth <shubhakaranth@gmail.com > wrote:
> Hi Experts,
>
> I want to see my object as below:
>     'C:\Program Files\R\R-2.4.0\bin\Rgui.exe'
> So I use the paste command. None of the below is working. Could anyone
help
> me on this?
>
> > paste("'C:\Program Files\R\R-2.4.0\bin\Rgui.exe'")
> [1] "'C:Program FilesRR-2.4.0\binRgui.exe'"
>
> > paste("'C:","\","Program 
Files","\","R","\","R-2.4.0","\","bin","\","
> Rgui.exe'",sep="")
> Error: syntax error in "paste("'C:","\","Program" 
>
> >paste("'C:","Program Files","R","R-2.4.0","bin","Rgui.exe'",sep="\")
> +
>
> I need to only use the \ symbol and not / or \\. Please help me... 
>
> Thank you,
> Shubha.
>
>        [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html 
and provide commented, minimal, self-contained, reproducible code.




-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem you are trying to solve? 


	[[alternative HTML version deleted]]


