の出力をprint(df.to.print)
プロットに印刷してもらいたいのですが。topleft
`legend(...)の呼び出しで、またはそのような場所を配置できれば素晴らしいのですがtopright
、それは単なるボーナスです。
いくつかのコード:
# A data.frame to play with
df.to.print <- structure(list(p.val = c(0.05, 0.1), self = c(0.0498, 0.0997),
H2007.REML = c(0, 0.01), H2007.ref = c(0, 0)), .Names = c("p.val",
"self", "H2007.REML", "H2007.ref"), row.names = c(NA, -2L), class = "data.frame")
# A simple plot
plot(1)
text(1,1, df.to.print )
# All of the entries are overlapping
# I can insert newlines easily enough
plot(1)
text(1,1, paste(as.character(df.to.print), collapse='\n'))
# But that looses all of the nice formatting in the data.frame.
# Which is easy enough to get on the console with:
print(df.to.print)
# Bonus points for 'topleft', 'topright', etc. like in legend().
どんな助けでもいただければ幸いです。