[R] cannot print a list with cat
Spencer Graves
@pencer@gr@ve@ @end|ng |rom e||ect|vede|en@e@org
Mon Oct 24 15:30:58 CEST 2022
On 10/24/22 7:39 AM, Steven T. Yen wrote:
> I have a "list" containing four elements, as shown below:
>
> > t(mycontrol)
>
> tol reltol steptol gradtol
> [1,] 0 0 1e-08 1e-12
>
> Printing this in a main program causes no problem (as shown above).
> But, using the command t(mycontrol) the line gets ignored. Any idea?
I'm confused. I get:
> (mycontrol <- list(tol=0, reltol=0,
+ steptol=1e-8, gradtol=1e-12))
$tol
[1] 0
$reltol
[1] 0
$steptol
[1] 1e-08
$gradtol
[1] 1e-12
>
> t(mycontrol)
tol reltol steptol gradtol
[1,] 0 0 1e-08 1e-12
I don't know what you mean by "main program" vs. "the command
t(mycontrol)".
???
Spencer Graves
> sessionInfo()
R version 4.2.1 (2022-06-23)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Big Sur 11.7
Matrix products: default
LAPACK:
/Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base
loaded via a namespace (and not attached):
[1] compiler_4.2.1 tools_4.2.1
> Thanks.
> Steven Yen
>
> ______________________________________________
> 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.
More information about the R-help
mailing list