[R] Printing upon calling a function
@tyen @end|ng |rom ntu@edu@tw
Mon Nov 30 10:41:59 CET 2020
Thanks. I know, my point was on why I get something printed by simply
doing line 1 below and at other occasions had to do line 2.
On 2020/11/30 下午 05:33, Jim Lemon wrote:
> Hi Steven,
> You seem to be assigning the result of me.oprobit(obj) to v instead of
> printing it. By appending ";v" tp that command line, you implicitly
> call "print".
> On Mon, Nov 30, 2020 at 7:15 PM Steven Yen <styen using ntu.edu.tw> wrote:
>> 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
>> In one case the data frame gets printed (similar to a regression
>> printout), with simply a call
>> 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,
>> return(out) # out is a data frame
>> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help