>> In my example, I don't want LSD.test to print any output, I just want
>> to use some of it later... How to stop it printing anything?

>?invisible


I'm not sure that works in this situation: 

test <- function() {
  print("output")
}

test()
invisible(test())

Both of the above still print out "output", which I think is the original 
problem. The invisible function will not print the value of a function, but if 
there is an explicit "print" call within the function, that will of course 
happen, since the value hasn't been returned at that point.  However, we don't 
know the original problem since LSD.test is not defined, and therefore the 
example is not reproducible.  I assume within the function, it is printing out 
some values using "print" or "cat"?  We just have to guess though.  

Maybe the answer is in ?sink ??

Erik 

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

Reply via email to