My code in RStudio is the next one:
---
title: "QUESTION 8 (a)"
author: "Ana"
date: "17/2/2023"
output:
beamer_presentation:
theme: "Malmoe"
colortheme: "crane"
toc: true
slide_level: 2
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(tinytex)
library(revealjs)
library(ISLR)
```
# Enunciado
bottomUse the lm() function to perform a simple linear regression with "mpg" as the response and "horsepower" as the predictor. Use the summary() function to print the results. Comment the result. For example:
# i)
```{r}
data(Auto)
fit <- lm(mpg ~ horsepower, data = Auto)
```
```{r}
summary(fit)
```
I want that the part of the code called "summary(fit)" appears in another slide, but i doesn´t, this appears in the same as "fit<-lm........"
How can I fix this? Thanks.
{}
button when you edit your question.