我希望将输出print(df.to.print)打印在绘图上.如果我可以在"传奇"(...)的调用中放置topleft或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 …Run Code Online (Sandbox Code Playgroud)