I am trying to find out the R code which will give me the output of the statistical analysis(i.e. Regression, DOE, Gage RR) in pdf or html format by using R ( Not by using R-stu
Yes, RMarkdown/knitr is the way to go.
See here for the documentation for creating a pdf document.
Your Rmd file might look something like the following:
---
title: "Report"
author: "XXX"
date: "January 7, 2017"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## Output
```{r}
x <- rnorm(100, 40, 3)
x
y <- rnorm(100, 100, 5)
y
fit <- lm(y ~ x)
summary(fit)
```
## Plot
```{r plot, echo=FALSE}
plot(y)
```
For an html document, simply change to output: html_document
.
Render the pdf or html document with rmarkdown::render('filepath/yourfile.Rmd')