[R] help with print and ways to display results

Moffet, Corey Corey.Moffet at ttu.edu
Thu Mar 21 21:10:22 CET 2002


Just drop the paste function.

This worked for me.

res <- c(1,2,3)
cat("Results are: ", res, "\n")


With best wishes and kind regards I am

Sincerely,

Corey A. Moffet
Instructor
Department of Range, Wildlife, and Fisheries Management
Mail Stop 2125
Texas Tech University
Lubbock, Texas 79409-2125

-----Original Message-----
From: Olivier Martin [mailto:olivier.martin at inrialpes.fr]
Sent: Thursday, March 21, 2002 11:27 AM
To: r-help
Subject: [R] help with print and ways to display results


Hi all,

I have some (stupid) problems to display  results and
i don't find a solution.

1-
res<-c(1,2,3)
I would like to display
 >Results are 1 2 3

The following command cat(paste("Results are  ",res,"\n")) give me
 >my results are  1 my results are  2 my results are  3

2- res<-cbind(c(1,2),c(2,3))
I would like to display
 >Result is the matrix 1 2
                                        2 3

Thanks,
Olivier.

-- 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-
Olivier MARTIN
PhD student                  phone : (33) 04 76 61 53 55
Projet IS2                               06 08 67 93 42		
INRIA Rhone-Alpes            fax   : (33) 04 76 61 54 77
655, Av. de l'Europe
Montbonnot                   e-mail: olivier.martin at inrialpes.fr
38334 Saint Ismier cedex     web   :
http://www.inrialpes.fr/is2/people/omartin
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-.-


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._.
_._
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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