[R] Problems with paste and blank

Dimitris Rizopoulos dimitris.rizopoulos at med.kuleuven.be
Wed Oct 17 13:59:08 CEST 2007


look at the `sep' argument of ?paste(), e.g.,

Stadtwerksname <- "Mannheim"
Laufwerk <- "C:\\"
paste(Laufwerk, Stadtwerksname, ".csv", sep = "")


I hope it helps.

Best,
Dimitris

----
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven

Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16/336899
Fax: +32/(0)16/337015
Web: http://med.kuleuven.be/biostat/
     http://www.student.kuleuven.be/~m0390867/dimitris.htm


----- Original Message ----- 
From: "Henrique Dallazuanna" <wwwhsd at gmail.com>
To: <thomas.schwander at mvv.de>
Cc: <r-help at stat.math.ethz.ch>; <r-help-request at stat.math.ethz.ch>
Sent: Wednesday, October 17, 2007 1:51 PM
Subject: Re: [R] Problems with paste and blank


See the argument 'sep' in the paste function.

paste(Laufwerk,Stadtwerksname,".csv", sep="")




On 17/10/2007, thomas.schwander at mvv.de <thomas.schwander at mvv.de> 
wrote:
>
> Hi there,
>
> I've got the following problem under Windows XP, R 2.5.1:
>
> When I'm pasting some objects:
>
> Stadtwerksname<-"Mannheim"
> Laufwerk<-"C:\\"
> paste(Laufwerk,Stadtwerksname,".csv")
>
> I get the result:
>
> [1] "C:\\ Mannheim .csv"
>
> The problem's are the superfluous gaps/blanks between the three 
> parts.
>
> Is there a way to get rid off this problem?
>
> Thx,
> Thomas
>
>
> ______________________________
>
> Thomas Schwander
>
> MVV Energie
> Konzern-Risikocontrolling
>
> Telefon 0621 - 290-3115
> Telefax 0621 - 290-3664
>
> E-Mail: Thomas.Schwander at mvv.de .  Internet: www.mvv.de
> MVV Energie AG . Luisenring 49 . 68159 Mannheim
> Handelsregister-Nr. HRB 1780, Amtsgericht Mannheim
> Vorsitzender des Aufsichtsrates: Herr Dr. Peter Kurz
> Vorstand: Dr. Rudolf Schulten (Vorsitzender) .  Matthias Brückmann . 
> Dr.
> Werner Dub . Hans-Jürgen Farrenkopf
>
>
>
>
>        [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at r-project.org 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.
>
>


-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

[[alternative HTML version deleted]]




--------------------------------------------------------------------------------


> ______________________________________________
> R-help at r-project.org 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.
> 


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm



More information about the R-help mailing list