[R] Printing
Rui Barradas
ru|pb@rr@d@@ @end|ng |rom @@po@pt
Sun Aug 11 16:09:43 CEST 2024
Às 09:51 de 11/08/2024, Steven Yen escreveu:
> Hi
>
> In the following codes, I had to choose between printing (= TRUE) or
> deliver something for grab (ei, vi). Is there a way to get both--that
> is, to print and also have ei and vi for grab? Thanks.
>
> Steven
>
> ...
>
> out<-round(as.data.frame(cbind(ap,se,t,p)),digits)
> out<-cbind(out,sig)
> out<-out[!grepl(colnames(zx)[1],rownames(out)),]
> if(printing){
> cat("\nAPPs of bivariate ordered probit probabilities",
> "\nWritten by Steven T. Yen (Last update: 08.11.24)",
> "\ny1.level=", y1.level,
> " y2.level=", y2.level,
> "\njoint12 =", joint12,
> "\nmarg1 =", marg1,
> "\nmarg2 =", marg2,
> "\ncond12 =", cond12,
> "\ncond21 =", cond21,
> "\nCovariance matrix:",vb.method,
> "\nWeighted =", weighted,
> "\nAt means =", mean,
> "\nProb x 100 =", times100,
> "\ntesting =" , testing,
> "\nuse_bb_and_vbb = ",use_bb_and_vbb,
> "\nsample size =", length(y1),"\n")
> if (!resampling) cat("\nSEs by delta method","\n")
> if (resampling) cat("\nSEs K-R resampling with",ndraws,"draws\n")
> return(out)
> } else {
> invisible(list("ei"=ap,"vi"=vap))
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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.
Hello,
Maybe change the end of the code to return a bigger list.
ll <- list(out = out, ei = ap, vi = vap)
return(ll)
} else {
invisible(list("ei"=ap,"vi"=vap))
Hope this helps,
Rui Barradas
--
Este e-mail foi analisado pelo software antivírus AVG para verificar a presença de vírus.
www.avg.com
More information about the R-help
mailing list