Re: [R] Hide return values

2013-11-19 Thread Brian Diggs

On 11/17/2013 5:28 AM, David Winsemius wrote:


On Nov 17, 2013, at 3:21 AM, Chris89 wrote:


Hi everyone!

I am in the process of writing an R-package and while writing a summary
function, I have come across a problem. I am able to print a summary
table
(as in a standard glm() summary) by using *cat()* but the values I
return is
also printet.
How am I able to remove the return values from being printet, but still
being able to grab using e.g. summary$coeff??


?invisible


But don't. See R FAQ 8.1 for a better approach.

--
Brian S. Diggs, PhD
Senior Research Associate, Department of Surgery
Oregon Health  Science University

__
R-help@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.


Re: [R] Hide return values

2013-11-18 Thread Chris89
Awesome, thanks!

-Chris



--
View this message in context: 
http://r.789695.n4.nabble.com/Hide-return-values-tp4680611p4680666.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


[R] Hide return values

2013-11-17 Thread Chris89
Hi everyone!

I am in the process of writing an R-package and while writing a summary
function, I have come across a problem. I am able to print a summary table
(as in a standard glm() summary) by using *cat()* but the values I return is
also printet. 
How am I able to remove the return values from being printet, but still
being able to grab using e.g. summary$coeff??

Sincerly
Chris



--
View this message in context: 
http://r.789695.n4.nabble.com/Hide-return-values-tp4680611.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@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.


Re: [R] Hide return values

2013-11-17 Thread David Winsemius


On Nov 17, 2013, at 3:21 AM, Chris89 wrote:


Hi everyone!

I am in the process of writing an R-package and while writing a  
summary
function, I have come across a problem. I am able to print a summary  
table
(as in a standard glm() summary) by using *cat()* but the values I  
return is

also printet.
How am I able to remove the return values from being printet, but  
still

being able to grab using e.g. summary$coeff??


?invisible

--
David.

__
R-help@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.