-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Kimmo Elo
Sent: Thursday, September 16, 2021 4:45 PM
To: r-help at r-project.org
Subject: Re: [R] adding results to plot
Hi!
Maybe with this:
text(x=0.6, y=1.2, paste0(capture.output(res), collapse="\n"), adj=0)
HTH,
Kimmo
to, 2021-09-16 kello 14:12 +0000, PIKAL Petr kirjoitti:
Virhe vahvistaessa allekirjoitusta: Virhe tulkittaessa Dear all
I know I have seen the answer somewhere but I am not able to find it.
Please
help
plot(1,1)
res <- shapiro.test(rnorm(100))
res
Shapiro-Wilk normality test
data: rnorm(100)
W = 0.98861, p-value = 0.5544
I would like to add whole res object to the plot.
I can do it one by one
text(locator(1), res$method)
text(locator(1), as.character(res$p.value))
...
But it is quite inconvenient
I could find some way in ggplot world but not in plain plot world.
Best regards
Petr
------=_NextPart_000_00C9_01D7AB15.A6E04EE0--