Can R visualize the t.test or other hypothesis test results?
<p>I need to work with many hypothesis tests in R and present the results. Here is an example:</p>

<pre class="lang-R prettyprint-override"><code>&gt; library(MASS)
&gt; h=na.omit(survey$Height)
&gt; 
&gt; pop.mean=mean(h)
&gt; h.sample = sample(h,30)
&gt; 
&gt; t.test(h.sample,mu=pop.mean)

    One Sample t-test

data:  h.sample
t = -0.0083069, df = 29, p-value = 0.9934
alternative hypothesis: true mean is not equal to 172.3809
95 percent confidence interval:
 168.8718 175.8615
sample estimates:
mean of x 
 172.3667 
</code></pre>

<p>Is there any way that we visualize the t.test or other hypothesis test results?</p>

<p>Below is an example of what I am looking for:</p>

<p><a href="https://i.stack.imgur.com/fiPrF.png" rel="noreferrer"><img src="https://i.stack.imgur.com/fiPrF.png" alt="enter image description here"></a></p>