You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
date: "`r format(Sys.Date(), format = '%d %B %Y')`"
output:
pdf_document: default
params:
data: NA
plot: NA
x_val: NA
y_val: NA
set_title: "Report"
set_author: NA
title: "`r params$set_title`"
author: "`r params$set_author`"
---
# Data
First, the data will be summarised:
```{r}
head(params$data)
str(params$data)
```
# Plot
You produced a plot of `r params$x_val` against `r params$y_val` which is displayed below:
```{r}
print(params$plot)
```
# Model
A linear model based on the data selected for the plot can be created. This is a linear regression to model response variable `r params$y_val` against predictor variable `r params$x_val`.
```{r}
model <- lm(reformulate(params$x_val, params$y_val), data = params$data)