Skip to content

help with print and ways to display results

1 message · Moffet, Corey

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