=" "), sep =" ")
-- Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Erin Hodgess
Sent: Friday, May 29, 2009 10:44 AM
To: R help
Subject: [R] probably simple paste question
On Fri, 2009-05-29 at 12:39 -0500, Erin Hodgess wrote:
> Dear R People:
>
> I have the following vector and am using the paste command:
>
> > ya
> [1] 57 2 8
> > paste("stuff",ya,sep=" ")
> [1] "stuff 57" "stuff 2" "stuff 8"
>
> What I want to have is
> "stuff 57 2 8"
>
>
> I also tried:
>
Nothing like posting your snag to make you solve it!
The answer is simply:
> c("stuff",ya)
[1] "stuff" "57""2" "8"
>
Sorry,
Erin
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodg...@gmail.com
__
Dear R People:
I have the following vector and am using the paste command:
> ya
[1] 57 2 8
> paste("stuff",ya,sep=" ")
[1] "stuff 57" "stuff 2" "stuff 8"
What I want to have is
"stuff 57 2 8"
I also tried:
> yb <- paste(cat("stuff",ya))
stuff 57 2 8> yb
character(0)
I have the feeling that
4 matches
Mail list logo