[R] prefixing list names in print
Uwe Ligges
ligges at statistik.uni-dortmund.de
Tue Aug 8 18:53:40 CEST 2006
Laurent Deniau wrote:
> With
>
> print(list(A="a",B="b"))
>
> it displays
>
> $A
> [1] "a"
>
> $B
> [1] "b"
>
> I would like to add a common prefix to all the list tags after the $.
> Pasting the prefix to the "names" does not work (appear after the $).
> For example if the prefix would be "P", it should display:
>
> P$A
> [1] "a"
>
> P$B
> [1] "b"
>
> I tried to add a "name" attribute to the list or to add a prefix="P" to
> print but nothing works. Any hint?
This is a very internal feature of print(). At a first quick look, I
think you will have to change the R sources and recompile.
Conclusion: Don't do it.
Uwe Ligges
> Thanks,
>
> Laurent.
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> 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