[R] Printing upon calling a function
Steven Yen
@tyen @end|ng |rom ntu@edu@tw
Mon Nov 30 09:14:35 CET 2020
I hope I can get away without presenting a replicable set of codes
because doing so would impose burdens.
I call a function which return a data frame, with the final line
return(out)
In one case the data frame gets printed (similar to a regression
printout), with simply a call
me.probit(obj)
In another case with a similar function, I could not get the results
printed and the only way to print is to do the following:
v<-me.oprobit(obj); v
This is a puzzle, and I hope to find some clues. Thanks to all.
My function looks like the following:
me.oprobit0 <- function(obj,mean=FALSE,vb.method,jindex=NA,
resampling=FALSE,ndraws=100,mc.method=1,times100=TRUE,
Stata.mu=FALSE,testing=FALSE,digits=3){
...
return(out) # out is a data frame
}
More information about the R-help
mailing list