I´m writing my thesis in LaTeX (using Overleaf) and I analyzed some data in R. So I have a R script where I perform a bunch of tests and regressions. Now I want to e.g. include the t-statistic and p-value in the Text.
x <- rnorm(10, 180, 10) y <- rnorm(10, 150, 10)
Our Hypothesis that x is taller than y was accepted (t =
t.test(x , y)$statisic; p =
S.t. In the final pdf it says:
Our Hypothesis that x is taller than y was accepted (t =-7.8841, p = 0.000).
What is the easiest way to do this? What is the workflow?
I`d be thankful for any advice using LaTeX. Even more so for advice for Overleaf.