is a bit overkill for my purpose, its use is straightforward and
simple. I checked it for several *test functions and did not find any
problem.
Thanks and best regards.
Petr
-Original Message-
From: Rui Barradas
Sent: Friday, September 17, 2021 9:56 PM
To: PIKAL Petr ; r-help
Subject: R
.
Thanks and best regards.
Petr
> -Original Message-
> From: Rui Barradas
> Sent: Friday, September 17, 2021 9:56 PM
> To: PIKAL Petr ; r-help
> Subject: Re: [R] adding results to plot
>
> Hello,
>
> *.test functions in base R return a list of class "htest"
Hello,
*.test functions in base R return a list of class "htest", with its own
print method.
The method text.htest for objects of class "htest" below is a hack. I
adapted the formating part of the code of print.htest to plot text().
I find it maybe too complicated but it seems to work.
Warnin
help mailing list project.org>
> Subject: Re: [R] adding results to plot
>
> Hi Petr,
> The hard part is the names for the data frame that addtable2plot requires:
>
> set.seed(753)
> res <- shapiro.test(rnorm(100))
> library(plotrix)
> plot(0,0,type="n",axes=
Hi Petr,
The hard part is the names for the data frame that addtable2plot requires:
set.seed(753)
res <- shapiro.test(rnorm(100))
library(plotrix)
plot(0,0,type="n",axes=FALSE)
addtable2plot(0,0,data.frame(element=names(res)[1:2],
value=round(as.numeric(res[1:2]),3)),xjust=0.5,
title=res$metho
Thanks,
I will try to elaborate on it.
Best regards.
Petr
> -Original Message-
> From: R-help On Behalf Of Kimmo Elo
> Sent: Thursday, September 16, 2021 4:45 PM
> To: r-help@r-project.org
> Subject: Re: [R] adding results to plot
>
> Hi!
>
> Maybe with t
Hallo
Thanks, I will try wat option is better if yours or Kimmo's
Best regards
Petr
> -Original Message-
> From: Bert Gunter
> Sent: Thursday, September 16, 2021 5:00 PM
> To: PIKAL Petr
> Cc: r-help
> Subject: Re: [R] adding results to plot
>
> I was
I was wrong. text() will attempt to coerce to character. This may be
informative:
> as.character(res)
[1] "c(W = 0.992709285275917)""0.869917232073854"
[3] "Shapiro-Wilk normality test" "rnorm(100)"
plot(0:1, 0:1); text(0,seq(.1,.9,.2), labels = res, pos = 4)
Bert
Bert Gunter
"The trouble
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 +, PIKAL Petr kirjoitti:
> Virhe vahvistaessa allekirjoitusta: Virhe tulkittaessa
> Dear all
>
> I know I have seen the answer somewhere but I am not able
res is a list of class "htest" . You can only add text strings to a
plot via text(). I don't know what ggplot does.
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
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
11 matches
Mail list logo