Aan de slagGa gratis aan de slag

Tidying a linear regression model

In the last section, you fit a linear model. Now, you'll use the tidy() function in the broom package to turn that model into a tidy data frame.

Deze oefening maakt deel uit van de cursus

Case Study: Exploratory Data Analysis in R

Cursus bekijken

Oefeninstructies

The US_fit linear model is available in your workspace.

  • Load the broom package.
  • Use the tidy() function from broom on the model object to turn it into a tidy data frame. Don't store the result; just print the output to the console.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Load the broom package


# Call the tidy() function on the US_fit object
Code bewerken en uitvoeren