[R] print
Pierre Kleiber
pkleiber at honlab.nmfs.hawaii.edu
Wed Sep 11 00:47:42 CEST 2002
Maybe not as easy as you wish, but this works:
> print(paste('The fruits in the basket are:',paste(Fruits,collapse=" ")))
[1] "The fruits in the basket are: Apple Orange Pear Banana Mango"
>
Cheers, Pierre
Ngayee J Law wrote:
> Hi all,
>
> Suppose I have a vector
> Fruits <- c('Apple','Orange','Pear','Banana','Mango')
>
> I want to print the statement
> "The fruits in the basket are: Apple, Orange, Pear, Banana, Mango"
>
> If I do:
> print(paste('The fruits in the basket are:',Fruits))
>
> The output is:
> [1] "The fruits in the basket are: Apple" "The fruits in the basket are:
> Orange"
> [3] "The fruits in the basket are: Pear" "The fruits in the basket are:
> Banana"
> [5] "The fruits in the basket are: Mango"
>
> Is there any easy ways to solve this problem? Thanks!
>
> - Jackie
>
>
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>
--
-----------------------------------------------------------------
Pierre Kleiber Email: pkleiber at honlab.nmfs.hawaii.edu
Fishery Biologist Tel: 808 983-5399/737-7544
NOAA FISHERIES - Honolulu Laboratory Fax: 808 983-2902
2570 Dole St., Honolulu, HI 96822-2396
-----------------------------------------------------------------
"God could have told Moses about galaxies and mitochondria and
all. But behold... It was good enough for government work."
-----------------------------------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list