Skip to content
Back to formatted view

Raw Message

Message-ID: <0671d8bb61d74f2db55853bf19f32381@SRVEXCHCM1302.precheza.cz>
Date: 2021-09-16T14:12:32Z
From: PIKAL Petr
Subject: adding results to plot

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