Your question is a bit unclear. If you return an object with a class, you can change the print or display method for the corresponding class. You will need to know if you are dealing with a class S3 or S4. loos in ?methodsof ?methodsfor details. as a quick example, if you return the s3 class 'ezANOVA', you define a function.
print.ezANOVA<-function(x){
}
Update
In light of your comment, and that you have already changed the exANOVA function. add this to the end of ezANOVA.
class(return.value)<-"ezANOVA"
return(return.value)
then add a function print.ezANOVAthat should handle it.
source
share